Python Forum

Full Version: Datetime conversion
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How to convert a string like”2015-08-15 20:40:00:0000Z” to datetime.pyi format.what is difference between datetime and datetime. Pyi format
You would use datetime.datetime.strptime() to convert it to a datetime.datetime object. You could them output it in whatever format you want using the strftime() method. I have no idea what datetime.pyi format is though.