I have the follow code, but having trouble removing the Z at the end. The time format looks like this 2020-07-28T15:47:36.165310258Z
from datetime import datetime
datetime.strptime(f[a]['Created On'], "%Y-%m-%dT%H:%M:%S.%f")
When using the %f, I noticed that it is only able to the next 6 digit. Is there any way to make it take more? This is the error that I am getting (MISSING) ValueError: unconverted data remains: 258Z
What is the best way to remove the Z and have it just return the date?
strptimeisn't great for dealing with ISO8601 formatted strings. I'd suggest usingarrowordateutilinstead.