Skip to main content
Preview Snowflake date & time functions in Snowflake compatibility mode. A date part can be written as a bare keyword, as DATEADD(day, 1, d), or quoted, as DATEADD('day', 1, d). Both are accepted, in every function that takes one. Snowflake’s aliases are normalised to the full part name, so YYYY, YR, MM, MONS, DD, WK, WOY, QTR, HRS, MINS and SECS all work. Note that M is minute and MM is month, as in Snowflake. EPOCH and EPOCH_SECOND give seconds since the epoch. Parts with no equivalent here are refused rather than approximated: DAYOFWEEK, DAYOFYEAR, the ISO parts, and the sub-second EPOCH_* parts. The last of those matters because the extractor available for them returns the milliseconds within the second rather than since the epoch, which is a different number.

Limitations

DATEADD on a DATE returns a TIMESTAMP at midnight rather than a DATE. The instant is the same; a client that checks the column type sees a different one. Confirmed against Snowflake: DATEADD(day, 1, DATE '2024-03-15') is typed DATE there and TIMESTAMP here. A part Firebolt does not carry, such as nanoseconds, is named in the error rather than silently dropped.