php format date

Is there a way in PHP I can format "2011-09-17" to "Saturday, 17 September 2011"?
PeterErhardAsked:
Who is Participating?
 
Garry GlendownConnect With a Mentor Consulting and Network/Security SpecialistCommented:
Assuming you start out with a timestamp, this should do the job:

$datestring=date("l, j F Y",$timestamp)

Open in new window


0
 
Chris HarteConnect With a Mentor ThaumaturgeCommented:
echo  date('l \t\h\e jS \of F Y g:i:s a', mktime(0, 0, 0, 9, 11, 2011));

Should do it. More examples here

http://uk.php.net/manual/en/function.date.php
0
 
Garry GlendownConsulting and Network/Security SpecialistCommented:
If all you have is the input shown above, you could do this:

$datestring=date("l, j F Y",strtotime($inputdate));

Open in new window

0
 
PeterErhardAuthor Commented:
Thank you both very much.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.