snowflake.snowpark.functions.datediff¶
- snowflake.snowpark.functions.datediff(part: str, col1: Union[Column, str], col2: Union[Column, str]) Column[source]¶
Calculates the difference between two date, time, or timestamp columns based on the date or time part requested, and returns result of
col2 - col1based on the requested date or time part.Example:
- Parameters:
part – The time part to use for calculating the difference
col1 – The first timestamp column or subtrahend in the datediff
col2 – The second timestamp column or the minuend in the datediff
See also