home
NOTE: Under Construction - I'm in the middle of upgrading my site and lots of stuff is kinda broken. Please forgive the mess.

Python Date and Time Examples: ISO Format

Note, these don't include time zones

November 2020
Code
from datetime import datetime

now = datetime.now()

# with millilsecond
print(now.isoformat())


# without milliseconds
print(now.isoformat('T', 'seconds'))
═══ § ═══

Footnotes And References