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

Announcements
Register by January 31 for $300 off your Qlik Connect pass: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
sergio0592
Specialist III
Specialist III

Format interval function

Hi all,

I'd like to format inteval in order to get the output below (with XX d, XX h, XX m instead XX:XX:XX)

Is it possible?

Regards

1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

You can also create a variable in your script:

SET vInterval2 = Dual(floor($1) & ' days ' & hour($1) & ' hours ' & Minute($1) & ' minutes',$1);

and then use

=$(vInterval2(145.5))

View solution in original post

4 Replies
swuehl
Champion III
Champion III

=floor(145.5) & ' days ' & hour(145.5) & ' hours ' & Minute(145.5) & ' minutes'

swuehl
Champion III
Champion III

You can also create a variable in your script:

SET vInterval2 = Dual(floor($1) & ' days ' & hour($1) & ' hours ' & Minute($1) & ' minutes',$1);

and then use

=$(vInterval2(145.5))

sergio0592
Specialist III
Specialist III
Author

Thanks for your reply but what is $1 in your formula?

swuehl
Champion III
Champion III

Thats denoting the first parameter in

Dollar-sign expansion using parameters ‒ QlikView