Python Forum

Full Version: datetime object
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am getting a date like '20200402130324.9500+0530' . How can I convert this to python datatime object ?
Use datetime.datetime.strptime and look for the strptime-behavior.

There is everything what you need. The +0530 is the timezone offset. +5 Hours, +30 minutes.
Let me guess: IST Indian Standard Time

If you need something to handle timezones, look for pendulum.