Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Datetime conversion
#1
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
Reply
#2
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.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'str' findbikash 2 9,589 Sep-18-2019, 08:32 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020