I get two type of timestamp (one with millisecond and another one without it)
'endtime': '2020-09-09T05:46:41.620Z'
'starttime': '2020-09-08T18:20:57Z'
I have to specify the format to convert it into datetime
timestampstart = pd.to_datetime(starttime, format="%Y-%m-%dT%H:%M:%S%fZ")
is there a way to generalize "format" in this line, because if my time has millisecond, the code will crash.
how can rewrite this to always ignore millisecond without getting my code crashed?