May 15, 2021 MySQL
The DATEDIFF() function returns the number of days between the two dates.
The date1 and date2 parameters are legitimate date or date/time expressions.
Note: Only the date portion of the value participates in the calculation.
Here's the SELECT statement:
The result is as follows:
DiffDate |
---|
1 |
Here's the SELECT statement:
The result is as follows:
DiffDate |
---|
-1 |