I have a .txt file that contains the string "2020-08-13T20:41:15.4227628Z"
What format code should I use in strptime
function in Python 3.7? I tried the following but the '8'
at end just before 'Z'
is not a valid weekday
from datetime import datetime
timestamp_str = "2020-08-13T20:41:15.4227628Z"
timestamp = datetime.strptime(timestamp_str, '%Y-%m-%dT%H:%M:%S.%f%uZ')
ValueError: time data '2020-08-13T20:41:15.4227628Z' does not match format '%Y-%m-%dT%H:%M:%S.%f%uZ'