This is based on hh:mm:ss but has the same concept (it's translated # seconds to hh:mm:ss): Formatting Time Durations in Tableau | Drawing with Numbers
Ultimately I would suggest creating a calculated field, but you'll need to define ranges or limits for when you want it to be converted to months or years. For example, when would you convert to months? 30 days? 31 days? 60 or 62 days? same for year (I'm assuming you'd just use 365 as the limit).
Hope this helps.