Relative Date queries not working?

7.11.0.2

I don’t know when this broke exactly because I don’t use this query method often, but it appears that one of the recent updates broke relative date queries in Specify 7.

The stock Specify stats panel queries which use relative date operators on the catalogued date field are not working as expected. Messing around with this, I can see that it’s actually all relative date operator queries that are broken.

To reproduce: query using a relative date operator on any table with a date field.

Behavior is as follows (not going to screencap all of them, the gist is quick to get):

  • Greater than (or equal to) [# days/weeks/months/years] “in the past” = all records in table that are not null for the queried date field.
  • Greater than (or equal to) [# days/weeks/months/years] “in the past” = all records in table that are not null for the queried date field.
  • Less than (or equal to) [# days/weeks/months/years] “in the past” = no records
  • Less than (or equal to) [# days/weeks/months/years] “in the future” = no records

Negating the conditions works as expected:

  • NOT Greater than (or equal to) [# days/weeks/months/years] “in the past” = no records
  • NOT Greater than (or equal to) [# days/weeks/months/years] “in the past” = no records
  • NOT Less than (or equal to) [# days/weeks/months/years] “in the past” = all records in table that are not null for the queried date field.
  • NOT Less than (or equal to) [# days/weeks/months/years] “in the future” = all records in table that are not null for the queried date field.


Hi @nfshoobs,

Thank you for reaching out! Querying on relative dates is fixed in v7.11.1 which released today and will be available to all hosted users on Monday.

Oh good! Glad to see it’ll be fixed when we pull that update. :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.