You have a table with dates. You need to get a dynamic result table where dates are newer than today date.
Solution
Switch the page to the edit mode.
Insert the Table Transformer macro and paste the table or the macros outputting tables within the macro body.
Select the macro and click Edit.
In the Presets tab select Custom transformation and click Next.
Enter the following SQL query:
SELECT *
FROM T1
WHERE T1.'Date' > "today"
SQL
Savethe macro and the page.
The "today" variable is also recognized by SQL functions operating with dates (for example, FORMATDATE, DATEDIFF, etc.), can be combined with other variables within the same query and successfully used in more complex SQL queries.
Use case with a more complex SQL
You have a table with dates. You need to get a dynamic result table with interval (number of days) between each date and today date.
Solution
Switch the page to the edit mode.
Insert the Table Transformer macro and paste the table or the macros outputting tables within the macro body.
Select the macro and click Edit.
In the Presets tab select Custom transformation and click Next.
Enter the following SQL query:
SELECT T1.'Date',
FORMATDATE("today") AS 'Today',
DATEDIFF(day, "today", T1.'Date') AS 'Date Difference from Today'
FROM T1
SQL
Savethe macro and the page.
Cookie Notice
This website uses cookies for analytics, personalization and advertising. By continuing to browse, you agree to our use of cookies. Learn more