Calculate the difference between two dates in Excel
One of Excel's handiest worksheet functions ù Datedif ù is undocumented. Datedif returns the difference between two dates, expressed in years, months, or days. You might use the Datedif function to calculate how many months the payment on an invoice is overdue or to count down the number of years, months, and days until the millennium.
Excel's Datedif function is identical to Lotus 1-2-3's @Datedif function and takes three arguments. Its syntax is: =datedif(start_date,end_date,units) where start_date is a date or a reference to a date, end_date is a date or a reference to a date, and units is a one- or two-digit string (in double quotes) specifying the units for the difference between the two dates.
Caption: Excel's Datedif function calculates the difference between dates any way you like û John Walkenbach | Category:spreadsheet Issue: November 1998 |
These Web pages are produced by Australian PC World © 1998 IDG Communications