https://docs.djangoproject.com/en/3.0/topics/db/queries/ check this 
documentation.

On Monday, June 8, 2020 at 8:03:46 AM UTC+5:45, Clive Bruton wrote:
>
> I would like to add a date comparison filter to a lookup, to find   
> items in a database table that have not yet expired. I tried: 
>
>         .filter(expires>=datetime.today()) \ 
>
> But this does not appear to have any effect. 
>
> "expires" is a column in the table of datetime type, that looks like   
> this: 
>
>         "2020-07-08 01:17:27.952874" 
>
> Or do I have to format "datetime.today()" to match the format   
> displayed in the database table? 
>
> Thanks 
>
>
> -- Clive 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d965d058-a490-4489-a6cb-a685b5bae178o%40googlegroups.com.

Reply via email to