4
Add 'Week' to interval options
Michael S
In DuneSQL, interval '1' week does not work.
The suggested workaround is to use '7' day, but this also causes datatype failures in the following code (where time granularity is an input - we want calendar months, so '30' day does not suffice)
CASE WHEN '{{Time Period}}' = 'week' THEN interval '7' day
WHEN '{{Time Period}}' = 'day' THEN interval '1' day
WHEN '{{Time Period}}' = 'month' THEN interval '1' month
END
Kavya Kavya
Ys
iftikhar Pathan
Yes
Florian
Merged in a post:
Support other Date Types in Intervals
Michael S
DuneSQL intervals only support 'day' and seem to not support 'week' or 'month' (i.e. interval '1' week) https://trino.io/docs/current/functions/datetime.html#interval-functions