Date Trunc
Date/Time Function
Description
Truncate to specified precision.
Click here to navigate to the PostgreSQL docs page for this syntax.
Grammar Syntax
DATE_TRUNC ( text, timestamp ) Sample Source Patterns
PostgreSQL
SELECT date_trunc('year', TIMESTAMP '2001-02-16 20:38:40');
2001-01-01 00:00:00Snowflake
SELECT date_trunc('year', TIMESTAMP '2001-02-16 20:38:40');2001-01-01 00:00:00.000Unsupported Precision Formats
PostgreSQL
Snowflake
Related EWIs
MSC-PG0010: PRECISION FORMAT IS NOT SUPPORTED IN SNOWFLAKE.
Last updated
Was this helpful?