Friday, September 10, 2004

Random oddness

Either I have a fatal flaw in my brain or I'm not understanding how a spreadsheet program can understand every 4 years is a leap year and there is an extra day in that year!

Open a new Excel spreadsheet and in column A, Row 1 type 7/1/2003 and in column B, Row 1 type 6/30/2004. In column C, format the cell (or column) to be a number with no decimal extensions. In column C, type in the following equation: +B1-A1+1 and hit the enter key. If done correctly, you will get the number 366.

Using the same columns, but row 2, type in the next year of dates (i.e., 7/1/2004 and 6/30/2005). If done correctly, your new number in column C will be 365.

Amuse me, keep doing the next sequential set of fiscal years and when you get to 7/1/2007 to 6/30/2008, your number again will be 366.

HOW DOES EXCEL know it is a leap year and adds the extra day? Must be a programming thing. I guess it could be cause every 4 years is a leap year (as well as a Presidential Election year).

Randomly bizarre!!!

Okay, I feel better now. Just had to share that bit of oddness. It was freaking my boss (Debbie) out.

So, then, have a great Friday!
dogeldanji!!!

0 Comments:

Post a Comment

<< Home