Returns the number of days, months, or years between two given dates.
Syntax
DATEDIF(start_date; end_date; type)
start_date: Starting date for the period. E.g. "1/1/2020"
end_date: Final or end date for the specified period. E.g. "2/4/2018"
Type |
Returns |
Y |
Number of years in the given period |
M |
Number of months in the given period |
D |
Number of days in the given period |
MD |
Difference between days in start_date and end_date, ignoring the months and years. |
YM |
Difference between months in start_date and end_date, ignoring the days and years. |
YD |
Difference between the days in start_date and end_date, ignoring the years alone. |
Examples
Formula |
Result |
=DATEDIF("1/1/2018";"2/4/2020";"Y") |
2 |
=DATEDIF("4/13/2020";"11/1/2020";"D") |
202 |
=DATEDIF("4/13/2020";"11/1/2020";"MD") |
19 |
Possible Errors
Errors |
Meaning |
#N/A! |
|
#NAME! |
|
#VALUE! |
|
#REF! |
|
Similar Functions
Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.
If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.
You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.