Loading

Sunday, April 17, 2005

MySQL difference between dates in number of days

To get a date difference in days in Mysql version before 4.1 (where you can use the datediff() function instead), do the following to calculate date difference:

select (TO_DAYS(date1)-TO_DAYS(date2))

SHARE TWEET

Thank you for reading this article MySQL difference between dates in number of days With URL http://x-tutorials.blogspot.com/2005/04/mysql-difference-between-dates-in.html. Also a time to read the other articles.

0 comments:

Write your comment for this article MySQL difference between dates in number of days above!