Formulas and Functions

Formulas and Functions

Ask for help with your formula and find examples of how others use formulas and functions to solve a similar problem.

Calculating the Year, Month, and Days for Tenure

✭✭
edited 03/26/21 in Formulas and Functions

Hello,

I am attempting to calculate tenure in years, months, and days given the total # of days. I calculated the # of days between hire date and term date in 1 column (# of Days), and used the formula below in another column. It is not calculating correctly, and I am getting decimal numbers for the months and days integers. What do I need to change in the formula and how do I get it to round so there are no decimals behind the ones place?

=INT([# of Days]@row / 365) + " " + "Years" + " " + ROUND([# of Days]@row - (INT([# of Days]@row / 365) * 365), 1) / 12 + " " + "Months" + " " + ROUND([# of Days]@row - INT([# of Days]@row / 365) * 365) / 7 + " " + "Days"

The answer I am getting is: 1 Year 5.75 Months 9.85714 Days broken down for 434 days.

Thank you!

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions