Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I would like to filter all data in the script (SQL) by a date. I want all the data that was created in the last 7 days.
I searched a little in the forum, unfortunately my solution does not work....
Can someone help me?
SET DateFormat='DD.MM.YYYY';
SET TimestampFormat='DD.MM.YYYY hh:mm:ss[.fff]';
LOAD "rechnung_dbid", "beleg_date";
SQL SELECT "rechnung_dbid", "beleg_date"
FROM pdserp."public"."pds_rechnung"
WHERE Interval(Date#($(TodayDate), 'DD.MM.YYYY') - Date#("beleg_date", 'DD.MM.YYYY'), 'DD') < 7;
Thanks Many greetings
Martin
Hi there, try this out:
SET DateFormat='DD.MM.YYYY';
SET TimestampFormat='DD.MM.YYYY hh:mm:ss[.fff]';
Let vFilterDate = Date(today()-7);
LOAD "rechnung_dbid", "beleg_date";
SQL SELECT "rechnung_dbid", "beleg_date"
FROM pdserp."public"."pds_rechnung"
WHERE Num(beleg_date) > '$(vFilterDate)' ;
Regards