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