Hi all,
I would like to display a date that is stored in the MySQL database as '04 Apr 2009'
I am currently displaying it as:
printf('date = %s', $row["date"]);
What is the correct syntax to display a formated date?
Cheers!
How is the date stored in the MySQL database?
the data is stored as 'datetime'
Also, how can I just display the hour and minutes with the Time?
You could select with the appropriate date format, e.g.,
SELECT DATE_FORMAT(`date`, '%d %b %Y %H:%i') FROM ...
Read the MySQL documentation for date_format for more information.