I have a datetime.datetime var property. I would like to know if this is less than one hour of the current time. Sort of
var.hour<datetime.datetime.today().hour - 1
The problem with the syntax above is that
datetime.datetime.today().hour
returns a number, such as "10", and this is not a date comparison, but a comparison of numbers.
What is the correct syntax?
Thanks!
Joel
source share