Jump to content

date() formatting from mysql


kortoom

Recommended Posts

Thank you to Daniel Egeberg for the great article on this topic...

 

I have a DATE field in MySql called 'date_created' that stores a date like this: 2009-09-30

I want to format that date like this: September 30, 2009

Which should be accomplished with this:

$date_created=date("F j, Y ", $row['date_created']);

echo $date_created;

Instead, this line of code outputs "December 31, 1969", no matter what date is in the database.

 

Please help!

Link to comment
https://forums.phpfreaks.com/topic/177216-date-formatting-from-mysql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.