"today" variable
Use case
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:
SQLSave the 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:
SQLSave the macro and the page.