Results 1 to 2 of 2
2003-07-12, 17:38 #1
- Join Date
- Jul 2003
- Hermosa Beach, California, USA
- Thanked 0 Times in 0 Posts
Time Expired Between Two Dates (97)
I have two dates, how do I calculate the time expired between the dates? FYI I have minimal experience with Excel. Thanks.
2003-07-12, 17:59 #2
- Join Date
- Mar 2002
- Thanked 28 Times in 28 Posts
Re: Time Expired Between Two Dates (97)
Excel stores dates internally as a number of days; to be more precise, the number of days between December 31, 1899 and the specified date. You can verify this by selecting a cell with a date and clearing its formatting by Edit | Clear | Formats (restore the formatting by Edit | Undo or Ctrl+Z).
So you can find the number of days between two dates by subtracting them, and clearing the formatting: say that the first date is in cell A1 and the second (later) date in cell B1. You want the days between them in cell C1. Enter the formula =B1-A1 into cell C1, then (with C1 selected), use Edit | Clear | Formats to set standard number format.
Excel also has a worksheet function DATEDIF to calculate date differences, but it is not documented in Excel 97. It takes the form =DATEDIF(Date1,Date2,Interval) where Interval is a quoted string that indicates the time interval you want. Use "d" for days, "m" for months and "y" for years. Using the same cells as above, the formula would become =DATEDIF(A1,B1,"d")
See DATEDIF function on Chip Pearson's website for more information.