MySQL saves time in military format in datetime field. I want to show this as standard time on the page. How can I do it? I want to convert 23:55:12 to 11:55:12 PM
You can convert it to a time stamp with strtotime(), and then format it with date(). $military_time = '23:55:12'; $standard_time = date('h:i:s A', strtotime($military_time)); Code (php):