snowflake.snowpark.functions.date_trunc¶
- snowflake.snowpark.functions.date_trunc(part: ColumnOrName, expr: ColumnOrName) Column[source]¶
Truncates a DATE, TIME, or TIMESTAMP to the specified precision.
Note that truncation is not the same as extraction. For example: - Truncating a timestamp down to the quarter returns the timestamp corresponding to midnight of the first day of the quarter for the input timestamp. - Extracting the quarter date part from a timestamp returns the quarter number of the year in the timestamp.
- Example::