Calculate time between dates with DateDif()
Jun,17
at4:34 pm
byjimazing
Use the DATEDIF when you want to caclulate the time between two dates. The time could be how many days, months or years.
The syntax for DATEDIF is
=DATEDIF(Date1, Date2, Interval)
Where:
Date1 is the earlier date,
Date2 is the later date,
Interval is the interval type to return (see table below)
|
Interval |
Meaning |
Description |
|
m |
Months |
Complete calendar months between the dates. |
|
d |
Days |
Number of days between the dates. |
|
y |
Years |
Complete calendar years between the dates. |
|
ym |
Months Excluding Years |
Complete calendar months between the dates as if they were of the same year. |
|
yd |
Days Excluding Years |
Complete calendar days between the dates as if they were of the same year. |
|
md |
Days Excluding Years And Months |
Complete calendar days between the dates as if they were of the same month and same year. |
Leave a Reply