
Although fully supported, this method is not reliable because date numbering varies on different computer systems. Since Microsoft Excel stores each date as a serial number beginning with January 1, 1900, you can put numbers corresponding to the dates directly in the formula. The following formula calculates the number of months between the specified dates: Excel understands dates in many formats, for example "2", "", "0", etc. For example, the following formula counts the number of days between the dates in cells A1 and B1: In your DATEDIF formulas, you can input the dates is various ways, such as: To put it differently, start_date and end_date are two dates to calculate the difference between. Start_date - the initial date of the period you want to calculate.Įnd_date - the ending date of the period.

#OPENOFFICE CALCULATE DIFFERENCE IN A CELL HOW TO#
If you have been following our blog series, you already know how to insert and format dates in your worksheets, how to calculate days, weeks, months and years as well as add and subtract dates. Over the past few weeks, we investigated nearly every aspect of working with dates and times in Excel.

In this tutorial, you will find a simple explanation of the Excel DATEDIF function and a few formula examples that demonstrate how to compare dates and calculate the difference in days, weeks, months or years.
