How to create datetime object from "16SEP2012" in python
Use datetime.datetime.strptime
:
>>> datetime.datetime.strptime('16Sep2012', '%d%b%Y')
datetime.datetime(2012, 9, 16, 0, 0)
Use datetime.datetime.strptime
:
>>> datetime.datetime.strptime('16Sep2012', '%d%b%Y')
datetime.datetime(2012, 9, 16, 0, 0)