Forum Discussion
tomorrow_star
Jan 13, 2021Copper Contributor
The parameter "yd" of the datedif function
start_date end_date datedif=>yd 1997/9/1 2000/7/1 =DATEDIF(a2, b2, "yd") => 303 2003/9/1 2021/7/1 =DATEDIF(a3, b3, "yd") => 304 first: 1997/9/1 =》1999/9/1, 1999/9/1 =〉 2000/7/...
tomorrow_star
Jan 13, 2021Copper Contributor
Thanks your guess.
According to your thinking, the above results will be inaccurate。
it should be 124、124、125。
JMB17
Jan 13, 2021Bronze Contributor
After doing a little reading, it appears the "md" and "yd" options are known to have bugs, and this is one suggested alternative:
=EndDate-EDATE(StartDate,ROUNDDOWN(YEARFRAC(StartDate,EndDate),0)*12)
=EndDate-EDATE(StartDate,ROUNDDOWN(YEARFRAC(StartDate,EndDate),0)*12)
- tomorrow_starJan 13, 2021Copper Contributor
Oh, Ok. This is also a good way as it stands. Thanks.