1In [37]:
2
3df = pd.DataFrame({'date':['2015-02-21 12:08:51']})
4df
5Out[37]:
6 date
70 2015-02-21 12:08:51
8In [39]:
9
10df['date'] = pd.to_datetime(df['date']).dt.date
11df
12Out[39]:
13 date
140 2015-02-21
1# If opening_date is currently a timestamp: 2021-01-09 00:00:00
2opening_date = pd.to_datetime(opening_date).date()
3print(opening_date)
4
5# Result: 2021-01-09