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/D59D05A5-02D8-42BD-A410-3ECDE22A9974%40indx.co.uk.

Reply via email to