On Wed, Jul 25, 2012 at 4:41 PM, MB Software Solutions, LLC <[email protected]> wrote: > On 7/25/2012 5:31 PM, Paul Hill wrote: >> On 25 July 2012 22:26, Sytze de Boer <[email protected]> wrote: >>> I never reply to this kind of email because I leave it to you gurus >>> However, I was just working with a live system where I use this formula >>> >>> today=date() >>> m1=(year(trans.date)*12)+month(trans.date) >>> m2=(year(today)*12)+month(today) >>> lvMonths=m2-m1 >> >> That's the idea same as my version :-) >> > > Yep...you both win the prize! Nice and neat. Thanks! -------------- Both startDT and endDT are datetime.
int monthDiff = System.Data.Linq.SqlClient.SqlMethods.DateDiffMonth(startDT, endDT); -- Stephen Russell Sr. Analyst Ring Container Technology Oakland TN 901.246-0159 cell _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CAJidMY+adPunQGjHMpUdgmvL9=c_=wfq9ff0zr5onrju759...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

