Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Time Converter (24h to 12h) by yoichi
def time_converter(time):
h, m = map(int, time.split(':'))
if h < 12:
ampm = 'a.m.'
else:
ampm = 'p.m.'
if h > 12:
h -= 12
elif h == 0:
h = 12
return '%d:%02d %s' % (h, m, ampm)
May 24, 2018
Comments: