Created
March 17, 2019 13:18
-
-
Save Mdslino/e787905076a504ca1d647e0d3ebabb6e to your computer and use it in GitHub Desktop.
Datetime convert from string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
datetime_obj1 = datetime.strptime('2006-01-02T15:04:05', '%Y-%m-%dT%H:%M:%S') | |
datetime_obj2 = datetime.strptime('2006-01-02 15:04:05', '%Y-%m-%d %H:%M:%S') | |
datetime_obj3 = datetime.strptime('02/01/2016 15:04:05', '%d/%m/%Y %H:%M:%S') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment