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))
Sunday, April 17, 2005
Subscribe to:
Post Comments (Atom)
3 comments:
very useful...thnx
very good functions for difference
SELECT DATEDIFF('2006-07-10','2006-06-01');
Post a Comment