datetime fromisoformat
- fromisoformat
import datetime
dt = datetime.datetime.fromisoformat('2000-01-01')
print(dt) # 2000-01-01 00:00:00
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
import datetime
dt = datetime.datetime.fromisoformat('2000-01-01')
print(dt) # 2000-01-01 00:00:00