Python Forum
Converting timestamp like 2023-04-18T20:00:10.000Z to 20230418200010
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Converting timestamp like 2023-04-18T20:00:10.000Z to 20230418200010
#3
It's ISO8601 and the method datetime.fromiso interprets this standard.
Docs: https://docs.python.org/3/library/dateti...misoformat

timestamp = datetime.datetime.fromisoformat("2023-04-18T20:00:10.000Z")
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Messages In This Thread
RE: Converting timestamp like 2023-04-18T20:00:10.000Z to 20230418200010 - by DeaD_EyE - Apr-20-2023, 11:44 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  error in timestamp Led_Zeppelin 3 5,151 Jun-15-2022, 08:28 PM
Last Post: deanhystad
  error in timestamp Led_Zeppelin 0 1,525 Jun-10-2022, 07:59 PM
Last Post: Led_Zeppelin
  Timestamp is undefined ErnestTBass 7 10,377 Feb-16-2019, 08:27 PM
Last Post: snippsat
  timestamp not updating bowen73 3 8,569 Aug-20-2017, 11:13 PM
Last Post: bowen73
  matplotlib timestamp zero_shubh0 2 7,838 Dec-02-2016, 02:12 PM
Last Post: zero_shubh0

Forum Jump:

User Panel Messages

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