[Solved] How to convert 12 hour string into 24 hour datetime? [closed]
The main problem with your format is that Python does not support anything more granular than microseconds, as explained here. In fact, assuming you have 000 as the last three decimals of seconds, you can use the format below. from datetime import datetime datetime_object = datetime.strptime(’24/NOV/18 05:15:00.000000000 AM’, ‘%d/%b/%y %I:%M:%S.%f000 %p’) If you cannot make … Read more