I am trying to write a function where it calculates how many seconds are in between each dates interval however I do not know how I can go about it. Here is the code for it:
def days_between(d):
d = datetime.strptime(d, "%Y-%m-%d %H:%M:%S")
dates= np.array(['2017-09-15 07:11:00' ,'2017-09-15 11:25:30', '2017-09-15 12:11:10', '2021-04-07 22:43:12', '2021-04-08 00:49:18'])
days_between(dates)
expected output:
15240, 2740...