Hi Frank, Thanks, but it is fine if the year is same. If years are different then result may comes in -ve value.
D K Dubey -----Original Message----- From: Frank Gates [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 5:09 PM To: D.K.Dubey Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: get months between two dates Use the month(date) function. select month(firstDate) - month(secondDate) from someTable where ...; Hope this helps. Frank "D.K.Dubey" wrote: > Hi, Can anybody tell me how i can calculate the months between two dates in > mysql. > thanks in advance > Regards > D K Dubey > > --------------------------------------------------------------------- > Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before > posting. To request this thread, e-mail [EMAIL PROTECTED] > > To unsubscribe, send a message to the address shown in the > List-Unsubscribe header of this message. If you cannot see it, > e-mail [EMAIL PROTECTED] instead. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php