TO_DAYS « Date Time « SQL / MySQL

1.TO_DAYS( ) can convert DATETIME or TIMESTAMP values to days, if you don't mind having it chop off the time par
2.If you pass TO_DAYS( ) a date-and-time value, it extracts the date part and discards the time.
3.Using two date-and-time values that lie a week apart
4.TO_DAYS( ) converts a date to the corresponding number of days
5.Calculating Intervals Between Dates
6.For an interval in weeks, do the same thing and divide the result by seven