Skip to content

Convert a date to its ISO-8601 equivalent in Python

Advertisements

from datetime import datetime
print(datetime(2020, 12, 15).isoformat())

#2020-12-15T00:00:00

See also  Converts Fahrenheit to Celsius in Python

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.