[Answer]-Django query datetime for objects on hourly basis

1👍

now=datetime.now()
Model.objects.filter(field__lte=now+datetime.timedelta(days=1))

u may use not only days, but also minutes, seconds, hours …

Leave a comment