Saturday, May 16, 2009

How can we know the number of days between two given dates using MySQL?

Use DATEDIFF()

SELECT DATEDIFF(NOW(),'2006-07-01');

No comments:

Post a Comment