I have two dates (datetime), and I would like to make a condition in my view using these dates.
date_start = object.date1
date_end = object.date2
now = datetime.datetime.now()
if now >= date_start & now <=date_end :
...
I have this error: unsupported operand type(s) for &: 'datetime.datetime'. So I tried to add now = now.date(), but still doesn't work.
Any idea on how to do that? Thank you.