I have a column of dates. I want to calculate the number of days between each datetime in the array and a specified date.
import datetime
print(mydates[0])
2013-04-30T20:00:00.000000000-0400
print(mydates[0] - datetime.date(2013,9,20))
TypeError: ufunc subtract cannot use operands with types dtype('<M8[ns]') and dtype('O')
I need to create an array with the number of days between those dates but, more generally, I will also need to know how to convert an array of datetimes into dates.
I found another post that converted datetime.datetime.now() into a date but I don't know how the syntax would work to use that on a an existing set of date times.