what is the correct date format for the time
2020-02-24T18:00:00
I have tried using dates_cc = dt.datetime.strptime(dates_c, '%Y-%m-%d%H:%M:%S')
but I get a wrong date format error.
what is the correct date format for the time
2020-02-24T18:00:00
I have tried using dates_cc = dt.datetime.strptime(dates_c, '%Y-%m-%d%H:%M:%S')
but I get a wrong date format error.
Just adding a T should work:
import datetime as dt
dates_c = "2020-02-24T18:00:00"
dates_cc = dt.datetime.strptime(dates_c, '%Y-%m-%dT%H:%M:%S')
dates_cc
Output:
datetime.datetime(2020, 2, 24, 18, 0)