Skip to main content

DATE_DIFF

Difference between two dates in days, when the inputs are dates

Example Usage

DATE_DIFF("2022-03-19", "2022-03-23") -> 4
DATE_DIFF("2022-03-23", "2022-03-22") -> -1

Overview

Function signature
DATE_DIFF(date1, date2)

Category
Date

Return data type
int

Arguments

NameDataTypeList Options                          Description
date1dateStarting date
date2dateEnding date (subtracts date1 from date2)