Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Time Converter (24h to 12h) by helloworld_22
def time_converter(time):
hour,minute=map(int,time.split(':'))
if hour<12:
t='a.m.'
else:
t='p.m.'
if hour>12:
hour-=12
if hour==0:
hour=12
return '%d:%02d %s'%(hour,minute,t)
Jan. 26, 2020