This content has been marked as final.
Show 2 replies
-
1. Re: MySQL formatting dates & times
David_Powers Jan 26, 2010 3:51 AM (in response to Mike_Watt)The full list of formatting specifiers is in the MySQL documentation at http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-format.
Use DATE_FORMAT() for your time columns.
DATE_FORMAT(theTime, '%l:%i%p') AS formatted_time
I think that MySQL uses AM and PM. If you want lowercase, just pass the database result to strtolower():
<?php echo strtolower($row_recordsetName['formatted_time']); ?>
-
2. Re: MySQL formatting dates & times
Mike_Watt Jan 26, 2010 2:20 PM (in response to David_Powers)As always, David - thank you very much. I Googled that several times and never came to the page you sent me. I appreciate it!!



