[Solved] How do i use a criterion of today minus 7 days in base query?
[Solved] How do i use a criterion of today minus 7 days in base query?
I have a table that includes dates of action items but they do not need to be address until they are 7 days old. I am trying to create an editable query that returns only qualified records of today minus 7 days. I have tried Now() -7 but it doesn't work. Any help would be great or other ways to accomplish the same goal thats automated. Thanks!
Last edited by guff54 on Sun Sep 11, 2022 4:57 pm, edited 1 time in total.
LibreOffice 7.3.2.2 on macOS 12.5.1
Re: How do i use a criterion of today minus 7 days in base query?
IF you are using embedded HSQL (see status bar), that database is documented here: http://www.hsqldb.org/doc/1.8/guide/ch09.html
It comes with DATEDIFF which calculates a number from 2 dates.
Unfortunately, that version of HSQL does not include DATEADD which would calculate a date from another date and a number.
It comes with DATEDIFF which calculates a number from 2 dates.
Code: Select all
SELECT * FROM "table" WHERE DateDiff('dd', "DateColumn", CURRENT_DATE)<8
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: How do i use a criterion of today minus 7 days in base query?
Thanks Villeroy!! That did the trick. I appreciate you!
LibreOffice 7.3.2.2 on macOS 12.5.1