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?
-
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"
-
@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
- 64K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 458 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 137 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!