Link to home
Start Free TrialLog in
Avatar of Donnie Walker
Donnie WalkerFlag for United States of America

asked on

How do I format these times to the 12hr format?

I have this code:

echo $row['startTime'] ." - ". $row['endTime'] ."<br>";

that returns the start and end time in military format (11:30:00 - 13:30:00).

How do I convert them to 12HR time like this:

11:30 AM - 1:30 PM

Any help would be appreciated.
ASKER CERTIFIED SOLUTION
Avatar of jamesrh
jamesrh
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Donnie Walker

ASKER

thanks