DateDiff

Returns the difference between two dates.

DateDiff(1, 2, 3)

OrdinalTypeDescription
1DateRequiredStarting date for comparison using either MM/dd/yyyy or YYYY-MM-DD format
2DateRequiredDate to subtract from starting date using either MM/dd/yyyy or YYYY-MM-DD format
3stringRequiredUnit of time of the difference. Valid values include Y, M, D, H, or MI

System returns: 1