Expand|Select|Wrap|Line Numbers
- sd = dt.date(2019, 8, 1)
- data['hist']=sd - data['transaction_created']
- data['hist'].astype('timedelta64[D]')
- data['hist']=data['hist'] / np.timedelta64(1, 'D')
- data.head()
to_char (r.created_at, 'yyyy-mm-dd') user_created,
to_char (t.created_at, 'yyyy-mm-dd') transaction_created
But getting following error upon execution - "TypeError: descriptor 'date' requires a 'datetime.datetime' object but received a 'int' "
Could anyone help me out with this? Would highly appreciate it.