You are viewing a single comment's thread. Return to all comments →
Easy python solution
def timeConversion(s): hour = int(s[:2]) period = s[-2:] if period == 'PM' and hour != 12: hour += 12 elif period == 'AM' and hour == 12: hour = 0 hour = f"{hour:02}" return f"{hour}{s[2:8]}"
Seems like cookies are disabled on this browser, please enable them to open this website
Time Conversion
You are viewing a single comment's thread. Return to all comments →
Easy python solution