Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
qvqfqlik
Creator
Creator

Convert a number to days and hours

In sense, Please help with converting a number to  days and hours in

eg:  150480  = 17 days 1hr

5 Replies
sunny_talwar

Is the number in seconds? If it is, do you want the out to be 1 day and 17 hours? May be like this

Interval(Number/86400, 'D hh')

qvqfqlik
Creator
Creator
Author

I need to display  in the format like   17 d 1 hr

effinty2112
Master
Master

Hi,

This is really clunky but it works:

Replace(Replace(Interval(Interval#(150480,'s'),'DXhhZ'),'X',' d '),'Z', ' hr')

=

1 d 17 hr

stalwar1 - there must be a less ridiculous way to do this.

Regards

Andrew

sunny_talwar

That is probably the best way I can think of....

saikiranrao
Partner - Contributor
Partner - Contributor

Hi effinty2112

How to get 1 d 17 hr 00 min 00 sec

Regards,

Sai Kiran