Skip to main content
Calculates the difference between two date values (expr1 - expr2) and returns a result in days. expr1 and expr2 are valid DATE or DATETIME expressions. Note: Only the date parts of the values are used in the calculation. Difference between datediff and days_diff: The difference between datediff and date_diff lies in that date_diff supports the unit parameter, which can return the difference between two date values in the specified unit.

Syntax

Examples

Text

References

date_diff