2022-02-18T00:00:00.000Z
in this string is the information that this time is 07:00 PM
with this being eastern time (ET), which appears correct as ET is 5 hours behind UTC. How can we (a) first convert from string to (datetime?, timestamp?), and then convert the resulting time object into 07:00 PM
? What has been tried:
from datetime import datetime
datetime.strptime('2022-02-18T00:00:00.000Z', '%Y-%m-%dT%H:%M:%S.%f')
...which throws the error time data '2022-02-18T00:00:00.000Z' does not match format '%Y-%m-%d %H:%M:%S.%f'
. What is being done wrong here?