I am trying to do a check if a variable is of type date using the below function:
from datetime import date, datetime
def verify_date_dt(in_date):
f_date = in_date
return isinstance(f_date, datetime.date)
I am calling this function from another file to check a date value -
in_date = date(2021,4,21)
print(verify_date_dt(in_date))
Am getting the below error -
TypeError: isinstance() arg 2 must be a type or tuple of types.
Would appreciate help. I am using Python 3.6.4