Function
DATEDIFF
Calculates the number of days between the two parameters. In this example the function returns
12
which is the number of days between the dates
SELECT 
    DATEDIFF('2021-03-25', '2021-03-13')
The function returns
negative number
if the second date is greater than the first one. In the example the result will be
-12
SELECT 
    DATEDIFF('2021-03-13', '2021-03-25')
by Valeri Tandilashvili
4 years ago
MySQL
Datetime functions
Full MySQL Course for Beginners
1
Pro tip: use ```triple backticks around text``` to write in code fences