
For most NGOs, it would be needful to know, based on the contractual terms of various consultants, how many months/years are remaining and subsequently, how many employees have their contracts ending, say in the next 3 months, 6 months, and so on. In an automotive industry, you would need to compute how long, say a given vehicle has taken to be serviced. In this example, DATEDIF returns the number of months in one year.In any working environment, there are various instances where you would be required to calculate the duration between two dates.Ī human resource officer would need to know how long a given employee has worked with the company or the actual age of the various employees for planning purposes. In this example, DATEDIF returns the number of days in the Apollo 11 mission. Use unit "YD" to answer questions such as, "How many days has it been since my last birthday, given my birthdate and today's date?"ĭATE: Converts a year, month, and day into a date.ĭATEVALUE: Converts a provided date string in a known format to a date value. Use unit "YM" to answer questions such as, "After subtracting whole years from my age, how many whole months old am I?" Use unit "MD" to answer questions such as, "After subtracting whole years and whole months from my age, how many days old am I?" Change the format of the cell to Number in order to view the expected result of 8. For example, if DATEDIF(DATE(1969,7,16),DATE(1969,7,24),"D") returns, the Date format has been applied to the cell. If DATEDIF produces a result in an unexpected format, ensure that no pre-existing format has been applied to the cell. Months and years are only counted if they are equal to or go past the "day." For example, the function returns "4 months" between the dates 9/30/15 and 2/28/16 (even though the 28th is the last day of the month). "YD": the number of days between start_date and end_date, assuming start_date and end_date were no more than one year apart.

"YM": the number of whole months between start_date and end_date after subtracting whole years. "MD": the number of days between start_date and end_date after subtracting whole months. "D": the number of days between start_date and end_date. "M": the number of whole months between start_date and end_date. "Y": the number of whole years between start_date and end_date.
/excel-edate-function-add-subtract-months-2-57bc111f3df78c87639fa073.jpg)

Unit - A text abbreviation for unit of time. Must be a reference to a cell containing a DATE, a function returning a DATE type, or a number. Must be a reference to a cell containing a DATE, a function returning a DATE type, or a number.Įnd_date - The end date to consider in the calculation.

Start_date - The start date to consider in the calculation. Calculates the number of days, months, or years between two dates.
