I get a response like this - "330". Now being the rocket scientist that I am icon_wink.gif I am able to see that it is 3 months and 30 days between dates.
I'd check that. What if it returned 110? Is that 1 month and 10 days or 11 months and 0 days ?
curdate() returns a date in the format YYYYMMDD so by subtracting another number from that i don't think you'll get the time difference between the 2.
You might need to use another function ( see http://dev.mysql.com/doc/mysql/en/Date_ ... tions.html ) such as datediff()
select datediff(curdate(), '2004-05-01');
= 123 days
I'm not sure how you worked out that 400 = 4months and 00 days ?
If it returned 100 how would you interperate that? 1 month and 0 days or 10 months and 0 days ?
The 400 won't be 4months and 00days as mysql would never return anything in that format, if anything, 400 will be 400 days (though in this case i suspect the 400 is meaningless).
And got the same result. Although for the sake of good conversation, I played around with the startdate on the other query and the out come was always correct. For example changing the start date to :