News:

The "Support Requests" forum is now viewable by guests.

Main Menu

mySQL/PHP Dates

Started by Daniel, January 26, 2006, 04:22:24 PM

Previous topic - Next topic

Daniel

Hi guys.  For my site, I have a database that holds a date.  As anyone with mySQL knowledge knows, a date is stored in the database in a format like 1983-03-17.

How can I get these dates to be converted to a format like January 26, 2006 for when I display the data on my website?

webzone (archived)

Use strtotime() to convert the MySQL dates into UNIX timestamps.

Then, you can pass this timestamp as the second argument of the date() function to get a date formatted exactly the way that you'll choose.

Daniel

Thanks for the timley support.