Return the number of days between two date values:
SELECT DATEDIFF("2017-06-25", "2017-06-15");
Try it Yourself »
The DATEDIFF() function returns the number of days between two date values.
DATEDIFF(
date1,
date2)
Parameter | Description |
---|---|
date1, date2 | Required. Two dates to calculate the number of days between. (date1 - date2) |
Works in: | From MySQL 4.0 |
---|
Return the number of days between two date values:
SELECT DATEDIFF("2017-06-25 09:34:21", "2017-06-15 15:25:35");
Try it Yourself »
Return the number of days between two date values:
SELECT DATEDIFF("2017-01-01", "2016-12-24");
Try it Yourself »
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!