datedif() arguments

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,554
Hi
I want to understand datedif() function. What I do not understand the logic behind "Y", "YM", MD"
Why YM to find month, why not only M? and why MD to find day? why not D same as Y for year. I do not understand the logic behind YM and MD? Thank you so much

= datediff(A1,today(),"Y") - to calculate year
= datedif(A1,today(),"ym") - to calculate months
= datedif(A1,today(), "MD") - to calculate days
 

Forum statistics

Threads
1,085,491
Messages
5,383,974
Members
401,868
Latest member
herbalgirlskincare

Some videos you may like

This Week's Hot Topics

Top