i was trying to display the date data from my database on my page.
if i have 2004-12-18 in my database the output on my form would look like Date: Saturday, December 18, 2004.
could someone help me out.
thanks
mincklerstraat
12:32 pm on Dec 18, 2004 (gmt 0)
Easiest would be to use strtotime() to convert this to a unix timestamp, and then use date() to convert this to the desired date format. Or you could modify your query to return the unix timestamp using UNIX_TIMESTAMP. [be.php.net...] is your place to be.
dreamcatcher
12:24 pm on Dec 19, 2004 (gmt 0)
You can also use DATE_FORMAT:
$query = mysql_query("SELECT DATE_FORMAT(date, '%W, %M %e, %Y') as date_string FROM table") or die(mysql_error());