Return the number of days between the date and year 0:
SELECT TO_DAYS("2017-06-20");
Try it Yourself »
The TO_DAYS() function returns the number of days between a date and year 0 (date "0000-00-00").
The TO_DAYS() function can be used only with dates within the Gregorian calendar.
Note: This function is the opposite of the FROM_DAYS() function.
TO_DAYS(
date)
Parameter | Description |
---|---|
date | Required. The given date |
Works in: | From MySQL 4.0 |
---|
Return the number of days between the date and year 0:
SELECT TO_DAYS("2017-06-20 09:34:00");
Try it Yourself »
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!