Reputation: 41
Time data 'Jun 02 16:06:57.451' does not match format '%m %d %H:%M:%S.%f'
'Jun 02 16:06:57.451'
'%m %d %H:%M:%S.%f'
datetime.strptime(input_time, "%m %d %H:%M:%S.%f")
Upvotes: 0
Views: 58
Reputation: 1095
Change the format to exactly the way you're supplying the date:
datetime.strptime('Jun 02 16:06:57.451',"%b %d %H:%M:%S.%f")
datetime.datetime(1900, 6, 2, 16, 6, 57, 451000)
Format types are here: Formats
Upvotes: 1