50.8k views
2 votes
Your boss in the human resources department asks you to write a function that calculates the length of time that employees have been with the firm, using the DATEDIF function. Assume that C2 contains the hire date for a given employee and that cell $AE$2 contains the cut-off date against which to compare the hire date to determine length of service.For a separate service recognition program,you need to calculate the length of service in complete years.What is the correct formula?

A) =DATEDIF(C2, $AE$2, "yr")
B) =DATEDIF($AE$2, C2, "year")
C) =DATEDIF($AE$2, C2, "yr")
D) =DATEDIF(C2, $AE$2, "y")

1 Answer

1 vote

Answer:

Option D is correct i.e., =DATEDIF(C2, $AE$2, "y").

Step-by-step explanation:

The user's supervisor well into the following department tells him to compose the feature which measures the amount that times staff has served in their company utilizing the DATEDIF feature. Consider whether C2 includes the hiring dates for that staff and then that cell $AE$2 includes the cut-off point for whom to evaluate the hiring time with the duration of the service.

So, therefore the following option is correct according to the given scenario.

User DWolf
by
4.8k points