aliibrahem
New Member
- Joined
- Jan 31, 2015
- Messages
- 24
Hello Everyone
I need an advice to find out the most accurate way to calculate Length of service for employees. taking into consideration the the month is 30 days and 365 days in a year (Law).
for example the start date (Hiring Date) is 20/5/2014 and the last day of work is 18/9/2020 (included),
I thought of YearFrac function but there is only actual/365
Here is what I thought of:
in Microsoft support calculate-the-difference-between-two-dates- there is a warning " We don't recommend using the DATEDIF "md" argument because it may calculate inaccurate results. "
Thank you
I need an advice to find out the most accurate way to calculate Length of service for employees. taking into consideration the the month is 30 days and 365 days in a year (Law).
for example the start date (Hiring Date) is 20/5/2014 and the last day of work is 18/9/2020 (included),
I thought of YearFrac function but there is only actual/365
Here is what I thought of:
- - using YearFrac function but there is only actual/365 (I not sure if it affects the 30 days in a month rule)
- - using Now function - hiring date divided by 365, or days(18/9/2020,20/5/2014)/365, resort to
- - using datedif function DATEDIF(20/5/2014,18/9/2020,"y")+(DATEDIF(20/5/2014,18/9/2020,"ym")/12)+(DATEDIF(20/5/2014,18/9/2020,"md")/30), or
in Microsoft support calculate-the-difference-between-two-dates- there is a warning " We don't recommend using the DATEDIF "md" argument because it may calculate inaccurate results. "
Thank you