snowflake.snowpark.functions.date_trunc¶
- snowflake.snowpark.functions.date_trunc(part: Union[Column, str], expr: Union[Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/release-v1.6.1/src/snowflake/snowpark/functions.py#L3730-L3754)¶
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::