We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Theres a simple way to do this with datetime which will save alot of time, but it doesnt hurt to do it the hard way and then take a look at the quick way:
Time Conversion
You are viewing a single comment's thread. Return to all comments →
Theres a simple way to do this with datetime which will save alot of time, but it doesnt hurt to do it the hard way and then take a look at the quick way:
datetime.strptime(s, "%I:%M:%S%p").strftime("%H:%M:%S")