Convert Numbers (Days) to To Year/Month
I'm trying to convert number of days to year and month. In excel I would use the following formula
=DATEDIF(0,[Days closed]11,"y") &" years, "&DATEDIF(0,[Days closed]11,"ym") &" months"
Though this formula does not work in smartsheet is there another way to do this
Comments
-
Exactly how are you wanting the data to be displayed?
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
I would like it to look something like 3year and 2 month
-
Try something along the lines of
=INT(Days@row / 365) + " years" + ROUND((Days@row - (INT(Days@row / 365) * 365)) / 12) + " months"
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
@Paul Newcome When I try the formula you note above, it is not calculating correctly for me. For example I have "120" which is selected in the "days@row" which on my sheet is "duration@row" as you have above, but the result is 0 years 10 months.
-
Hi @LS
Did you figure out how to do it? Thank you!
-
The following modified formula works
=INT(Days@row / 365) + " years " + ROUND((Days@row - (INT(Days@row / 365) * 365)) / (365 / 12)) + " months"
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.9K Get Help
- 376 Global Discussions
- 207 Industry Talk
- 440 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 284 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!