Can someone point me to a format or a code snippet to parse date in format like
04SEP12:00:00:00
That %dd%mm%YY:%HH:%MM:%SS
doesn't work.
Use format string: '%d%b%y:%H:%M:%S'
and pass this as the format for to_datetime
, you can find the format options in the docs:
In [73]:
pd.to_datetime('04SEP12:00:00:00', format='%d%b%y:%H:%M:%S')
Out[73]:
Timestamp('2012-09-04 00:00:00')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With