Datediff
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.
Parameters
Name
Type
Description
Is Optional
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
Example
Source Code
Last updated