I have an SQL database of events with date and time. Time ("wTime") was stored as 10:00:00 or 01:00:00. 10:00 should be 10:00 AM and 1:00 should be 1:00 PM The SQL querry is ...ORDER BY wDate, wTime";... output is tabled -
<td><?php echo date('H:i, strtotime($row['wTime']))?></td>
Now the issue is that 1:00 is showing up before 10:00:00 and I'm not sure how or where to change it. I first changed the php to ... echo date('H:i A, stringtotime(... but that changed ALL the times to AM. That didn't suprise me so I went back to the table and changed 1:00:00 to 13:00:00 and now it sorts in the right order, but users aren't going to know 13:00 PM is 1:00 PM. I think the solution is in the php for formatting the display.
Any help as always is greatly appreciated!
Thanks,
Evil8
<td><?php echo date('H:i, strtotime($row['wTime']))?></td>
Now the issue is that 1:00 is showing up before 10:00:00 and I'm not sure how or where to change it. I first changed the php to ... echo date('H:i A, stringtotime(... but that changed ALL the times to AM. That didn't suprise me so I went back to the table and changed 1:00:00 to 13:00:00 and now it sorts in the right order, but users aren't going to know 13:00 PM is 1:00 PM. I think the solution is in the php for formatting the display.
Any help as always is greatly appreciated!
Thanks,
Evil8