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
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!