We have a dateframe, which has 2 i.a. 2 columns with dates. We need to calculate difference between them in days.
import datetime
from datetime import date
date1 = datetime.strptime(payments['ts'], '%d/%m/%y %H:%M:%S')
date2 = datetime.strptime(payments['date'], '%d/%m/%y %H:%M:%S')
payments['delta'] = (date1 - date2).days
this gets the error: module 'datetime' has no attribute 'strptime'. What did I do wrong? Thank ye.