How to change 08:00:00 to 08:00 in PHP/MySql

WestMich01

New Member
I have time type in mysql and I input time with format of HH:MM. This is stored in DB as HH:MM:00.Now when I display, it shows seconds as well.I only want to show hour and minutes.In stead of 13:20:00, showing 13:20 etc.What is the best way to do it.I can use substr($time, 0, 5), but I am wondering if there is a better way to do it.Thanks in advance.
 
Back
Top