You are viewing a single comment's thread. Return to all comments →
Here is my solution
import datetime
def timeConversion(s): t1=datetime.strptime(s,"%I:%M:%S%p") miltary_time=t1.strftime('%H:%M:%S')
return miltary_time
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 →
Here is my solution
import datetime
def timeConversion(s): t1=datetime.strptime(s,"%I:%M:%S%p") miltary_time=t1.strftime('%H:%M:%S')