I have a field in a dataset activity['date time']
that is currently a string and has this format: "2021-05-20T03:36:34.760"
I've been trying to convert it to a date field without the time, so essentially dropping everything after the T.
I've tried the following and nothing has worked.
pd.to_datetime(activity['date time'])
This code changes the time to just 0, but I would want it to be dropped:
datetime.strptime(activity['date time'], '%Y-%m-%d')