Google News
logo
Microsoft Excel - Quiz(MCQ)
Which function is used to get days, months, or years between two dates?
A)
DATE()
B)
CURDATE()
C)
DATEDIF()
D)
DATEVALUE()

Correct Answer :   DATEDIF()


Explanation :

The DATEDIF() function is used to get days, months, or years between two dates.
 
Syntax : =DATEDIF (start_date, end_date, unit)

Example :
 
=DATEDIF("20-02-2020","20-02-2022","y") // Returns 2
=DATEDIF("20-02-2020","20-02-2022","m") // Returns 24
=DATEDIF("20-02-2020","20-02-2022","d") // Returns 731

Advertisement