blob: 7ccaee7ad3bd478bd2cf2567e570a19bbf185256 (
plain) (
blame)
1
2
3
4
5
|
datediff(date1, date2) - Returns the number of days between date1 and date2
date1 and date2 are strings in the format 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd'. The time parts are ignored.If date1 is earlier than date2, the result is negative.
Example:
> SELECT datediff('2009-30-07', '2009-31-07') FROM src LIMIT 1;
1
|