import datetimevar = "2022-05-28T21:12:01.516Z"date_obj = datetime.datetime.strptime(var, "%Y-%m-%dT%H:%M:%S.%f%z")print(date_obj)
Standard input is empty
2022-05-28 21:12:01.516000+00:00
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!