Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23160

ValueError: time data does not match format '%Y-%m-%dT%H:%M:%S.%fZ'

$
0
0

While running the following code I'm getting following error

ValueError: time data '2024-04-27T04:50:23.3480072Z' does not match format '%Y-%m-%dT%H:%M:%S.%fZ'

Here is my python code

from datetime import datetimetime_string = '2024-04-27T04:50:23.3480072Z'format_string = '%Y-%m-%dT%H:%M:%S.%fZ'parsed_time = datetime.strptime(time_string, format_string)print(parsed_time)

I'm passing the correct date format string still getting error.


Viewing all articles
Browse latest Browse all 23160

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>