I just discovered that Excel doe not calculate leap year correctly. Excel uses a number as a date. When I convert that to a current date using 1/1/1900 it is two days off. Seems Excel assumes incorrectly that 1900 is leap year and also that 1/1 is day zero and not day one. So I have to add two days to make the conversion come out right.
Jeff --------------- Jeff Johnson [email protected] (623) 582-0323 www.san-dc.com On 04/12/2011 02:48 PM, MB Software Solutions, LLC wrote: > How do you test to see if it's a leap year? The first thing that comes > to my mind is checking to see if DATE(nCurrentYearVariable,2,29) throws > an error or not. e.g. > > dDate = DATE(nCurrentYearVariable,2,29) > lLeapYear = not empty(dDate) > > Better ideas? > _______________________________________________ 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/[email protected] ** 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.

