# Thread: Time Expired Between Two Dates (97)

1. ## 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.

2. ## 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")