How to reformat date in PHP?
Posted
by Lisa
on Stack Overflow
See other posts from Stack Overflow
or by Lisa
Published on 2010-05-02T20:02:06Z
Indexed on
2010/05/02
20:07 UTC
Read the original article
Hit count: 172
php
I am pulling the dates of various posts from a database. The dates are in the following format:
2009-08-12
Numeric Year - Numeric Month - Numeric Day
How can I reformat these dates to something more user friendly like:
August 12, 2009
Numeric Month Numeric Date, Numeric Year
Assuming that the date gotten from the mysql database is stored in a variable called:
$date = $row['date_selected'];
© Stack Overflow or respective owner