Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
strftime() / strptime() solution in Clear category for Time Converter (24h to 12h) by martin.pilka
def time_converter(time):
from datetime import datetime
dt = datetime.strptime(time, '%H:%M')
return dt.strftime('%-I:%M %p').replace('AM', 'a.m.').replace('PM', 'p.m.')
Feb. 1, 2019
Comments: