Calculating Age or Anniversary Years

Ever wanted to calculate someones age or how long they have been with a company?

1. Create a new List.

2. Create a new column, set the type to Date and Time, with the Date and Time Format set to Date Only.

 

3. Create a column and name it Today, data type of Single line of text.

 

4. Create another column and name it Anniversary, type is Calculated (calculation based on other columns), set the data type to Number, and set the decimal place to 0.

The formula is:

=YEAR(Today)-YEAR(HireDate)-IF(OR(MONTH(Today)<MONTH(HireDate),AND(MONTH(Today)=MONTH(HireDate),DAY(Today)<DAY(HireDate))),1,0)

5. Now you want to delete your Today column that you just created (trust me, just try it).

6. Navigate back to your list and try entering a few values.  In my example, Today is equal to 8/18/2011.