Datedif Function Excel For Mac 2016
Jun 20, 2017 Okat, Microsoft states that the DATEDIF function 'Calculates the number of days, months, or years between two dates. Warning: Excel provides the DATEDIF function in order to support older workbooks from Lotus 1-2-3. The DATEDIF function may calculate incorrect results under certain scenarios. It has been officially recognised and introduced by Microsoft in Excel 2016 and is present in Help also. It doesn't appear in Insert Function list though. Hence, it doesn't pop up the syntax of DATEDIF if DATEDIF is written. OP needs to write the complete syntax of DATEDIF to make this workable.
This Excel tutorial explains how to use the Excel DATEDIFF function with syntax and examples.
Description
The Microsoft Excel DATEDIFF function returns the difference between two date values, based on the interval specified.
The DATEDIFF function is a built-in function in Excel that is categorized as a Date/Time Function. It can be used as a VBA function (VBA) in Excel. As a VBA function, you can use this function in macro code that is entered through the Microsoft Visual Basic Editor.
Syntax
The syntax for the DATEDIFF function in Microsoft Excel is:
Parameters or Arguments
The interval of time to use to calculate the difference between date1 and date2. Below is a list of valid interval values.
Interval | Explanation |
---|---|
yyyy | Year |
q | Quarter |
m | Month |
y | Day of year |
d | Day |
w | Weekday |
ww | Week |
h | Hour |
n | Minute |
s | Second |
Returns
The DATEDIFF function returns a numeric value.
Applies To
Excel For Mac Review
- Excel for Office 365, Excel 2019, Excel 2016, Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000
Example (as VBA Function)
The DATEDIFF function can only be used in VBA code in Microsoft Excel.
Gadwin printscreen windows 7. Let's look at some Excel DATEDIFF function examples and explore how to use the DATEDIFF function in Excel VBA code:
For example, you could use the DATEDIFF function in VBA code and create the following function:
Based on the spreadsheet above, the following Excel function would return the following values:
Datedif Function Excel For Mac 2016 Product
The english function name DATEDIF() has been translated into 15 languages. For all other languages, the english function name is used. There are some differences between the translations in different versions of Excel.
Availability
Excel Versions | Availability | Category |
---|---|---|
Excel (Office 365) | Yes | Hidden |
Excel 2013 | Yes | Hidden |
Excel 2010 | Yes | Hidden |
Excel 2007 | Yes | Hidden |
Excel 2003 | Yes | Hidden |
Reference language
Language | Designation |
---|---|
English | DATEDIF |
Translations
Language | Designation |
---|---|
Basque | DATADIF |
Catalan | DIFDATA |
Danish | DATO.FORSKEL |
Dutch | DATUMVERSCHIL |
Finnish | PVMERO |
Galician | DATADIF |
Hungarian | DÁTUMTÓLIG |
Italian | DATA.DIFF |
Norwegian | DATODIFF |
Polish | DATA.RÓŻNICA |
Portuguese, Brazil | DATADIF |
Portuguese, Portugal | DATADIF |
Russian | РАЗНДАТ |
Spanish | SIFECHA |
Turkish | ETARİHLİ |
Links to the Microsoft Online Help for the function DATEDIF()
Note: Microsoft is currently updating the links and contents for the Excel online help. Therefore, some of the following links may not work as expected and lead to an error page. The links will on this site will be updated as soon as possible.
Excel 2016 Datedif Function
Language | |||
---|---|---|---|
Arabic | Finnish | Kazakh | Russian |
Basque | French | Konkani | Serbian |
Bulgarian | Galician | Korean | Slovak |
Catalan | German | Latvian | Slovenian |
Chinese - Simplified | Greek | Lithuanian | Spanish |
Chinese - Traditional | Gujarati | Malaysian | Swedish |
Croatian | Hebrew | Marathi | Thai |
Czech | Hindi | Norwegian | Turkish |
Danish | Hungarian | Polish | Ukrainian |
Dutch | Indonesian | Portuguese, Brazil | Vietnamese |
English | Italian | Portuguese, Portugal | - |
Estonian | Japanese | Romanian | - |