Datediff
Last updated
Last updated
Calculates the difference between two date, time, or timestamp expressions based on the date or time part requested. Difference is calculated as date_1 - date_2.
Name | Type | Description | Is Optional |
---|---|---|---|
date_part | date_part | Must be one of the values listed in Supported Date and Time Parts | |
date_1 | mixed_value | Starting date. Can be a date column, date, time, or timestamp. | |
date_2 | mixed_value | Date to subtract from date_1. Can be a date column, date, time, or timestamp. | |
alias | value | Name for the new column created by the datediff. | True |