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 Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
rsammy Posted January 31, 2007 Author Share Posted January 31, 2007 thanx. problem solved Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.