Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert days into years months days

Hi,

I have a field in a table which has the no. of days

Consider Days_age as 400 days,

We should convert it as 1 year, 1 month, 5 days as the output.

So how do we achieve this in script?

1 Reply
antoniotiman
Master III
Master III

Hi,

I assume = Year = 365 days and Month = 30 Days.

Try

=Floor(400/365)&' - '&Floor(Mod(400,365)/30)&' - '&Mod(Mod(400,365),30)

Replace 440 with Your Field and - with Text

Regards,

Antonio