Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
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
MVP
MVP

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
MVP
MVP

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

swuehl
MVP
MVP

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
MVP
MVP

Thats denoting the first parameter in

Dollar-sign expansion using parameters ‒ QlikView