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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Sazabi
Creator
Creator

Converting number of minutes to output of "X Days, X Hours, X seconds"

Hi Qliksters,

 

Is there a nice and easy way to convert number of minutes to something formatted like "X Days, X Hours, X Seconds"?

 

For example, I have 1897.64 minutes.

I want that number converted to an output of "1 Day, 7 Hours, 37.64 Minutes" in a table.

 

Possible? Or do I have to go crazy with string manipulation? 

 

Thanks!

 

S

1 Reply
Taoufiq_Zarra

you can

=interval( Field / 1440, 'dd:hh:mm.ss')

for this format :

Taoufiq_ZARRA_0-1590170224598.png

 

or add subfield like :

=subfield(interval( Field / 1440, 'dd:hh:mm.ss'),':',1)&' Day,'&subfield(interval( Field / 1440, 'dd:hh:mm.ss'),':',2)&' Hours,'&subfield(interval( Field / 1440, 'dd:hh:mm.ss'),':',3)&' Minutes'

 

Taoufiq_ZARRA_1-1590170274557.png

 

 

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉