Friday, October 21, 2011

How to Calculate the Number of Days Between Dates


Hand Calculation
1. Subtract the year values. If the more recent date is earlier in the year than the other date, subtract 1 from the difference. Multiply the result by 365. Add 1 for each leap year in between the 2 years. A leap year occurs in every year divisible by 4, except years divisible by 100 that are not divisible by 400. Example: 2010 -- 1982 = 28 years * 365 = 10,220 plus 7 (for the leap years 1984, 1988, 1992, 1996, 2000, 2004, 2008) = 10,227.
2. Sum the days in the whole months between the two dates and add to the previous number. For example, from February, 1982, to May, 2010, adds 31 days for March and 30 days for April. Summed to the previous number, that is 10,227 61 = 10,288.
3. Add the days remaining in the earlier month and the days past in the more recent month to the previous total. For example, from February 7, 1982, to May 21, 2010, add 21 days of February and 21 days of May. Summed to the previous number, that is 10,288 42 = 10,330.
Excel Spreadsheet
4. Open an empty spreadsheet and format the first column (A) as a date. Click on the column header. Choose 'Home' from the toolbar, click on the format drop-down list and change the column format from 'General' to 'Date.'
5. Type the more recent date (5/21/2010) in cell A1. Type the earlier date (2/7/1982) in cell A2.
6. Create a formula in cell B2 that performs the subtraction. Type = A1 -- A2 and press 'Enter.' The answer will appear automatically.
Google Documents Spreadsheet
7. Visit http://docs.google.com/. Sign into an existing Google account (gmail, igoogle, etc.) or create a new account.
8. Click the 'Create New' button near the upper left-hand corner and choose 'Spreadsheet' from the drop-down list. Depending on browser and settings, Google will open a blank spreadsheet in a new window or tab.
9. Click on the header of column A to highlight the column. Click on the down arrow next to the '123' in the toolbar and choose 'Date' from the drop-down menu.
10. Type the more recent date (5/21/2010) in cell A1 and the earlier date (2/7/1982) in cell A2.
11. Create a formula in cell B2 to perform the subtraction: type = A1 -- A2 and press 'Enter.' The answer will appear automatically.

Blogger news