
Here's how it does this: First the DATE function creates the date. This formula subtracts the first day of the ending month () from the original end date in cell E17 (). If you are trying to calculate the remaining days after the last completed month, here is a workaround: The "MD" argument may result in a negative number, a zero, or an inaccurate result. If the s tart_date is greater than the e nd_date, the result will be #NUM!.Ĥ40 days between June 1, 2001, and Aug(440)ħ5 days between June 1 and August 15, ignoring the years of the dates (75) The DATEDIF function is useful in formulas where you need to calculate an age. By default, Januis serial number 1, and Januis serial number 39448 because it is 39,447 days after January 1, 1900. The years of the dates are ignored.ĭates are stored as sequential serial numbers so they can be used in calculations. The difference between the days of start_date and end_date. The days and years of the dates are ignored The difference between the months in start_date and end_date. Important: We don't recommend using the "MD" argument, as there are known limitations with it. The months and years of the dates are ignored. The difference between the days in start_date and end_date. The number of complete months in the period. The number of complete years in the period. The type of information that you want returned, where: Dates may be entered as text strings within quotation marks (for example, "0"), as serial numbers (for example, 36921, which represents January 30, 2001, if you're using the 1900 date system), or as the results of other formulas or functions (for example, DATEVALUE("0")).Ī date that represents the last, or ending, date of the period.



SyntaxĪ date that represents the first, or starting date of a given period. Please see the known issues section of this article for further details. The DATEDIF function may calculate incorrect results under certain scenarios. To download an update, select the corresponding Knowledge Base article in the following list, and then go to the "How to download and install the update" section of the article.Warning: Excel provides the DATEDIF function in order to support older workbooks from Lotus 1-2-3. We recommend that you install all updates that apply to you. These updates are intended to help our customers keep their computers up-to-date. Microsoft released the following security and nonsecurity updates for Office in May 2023.
