rsammy Posted January 31, 2007 Share Posted January 31, 2007 how do i format th etime in query below... SELECT batch_ID, Date_Format(batch_date_created, '%m/%d/%Y') as batch_date_created, batch_time_created FROM billing_batch WHERE Date_Format(batch_date_created, %m/%d/%Y) as batch_date_created <= '$dates' AND batch_date_created >= '$datez' ORDER BY batch_ID $select"; i need to display time in 12-hr format as hh:mm AM or PM i tried using '%h:%i A' - but it just displays as hh:mm A. how can i get the AM or PM to display? HELP PLLLLLLLLLEEEEEEEEEEEEEAAAAAAAAAAAAAAAAASE Link to comment https://forums.phpfreaks.com/topic/36559-solved-time-format/ Share on other sites More sharing options...
Jessica Posted January 31, 2007 Share Posted January 31, 2007 Technically this is a mysql question, not PHP. The manual explains this. Instead of A you need to use %p http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html Link to comment https://forums.phpfreaks.com/topic/36559-solved-time-format/#findComment-174086 Share on other sites More sharing options...
rsammy Posted January 31, 2007 Author Share Posted January 31, 2007 thanx. problem solved Link to comment https://forums.phpfreaks.com/topic/36559-solved-time-format/#findComment-174091 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.