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