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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
43918084
Creator II
Creator II

Convert second to week day hour min

I have table value in second like 72000, &28800 etc.  I need to present as 2d4h and 1d, respectively.

The calculation is based 5 days as a week.  8 hours as one day.

Would appreciate some expert guidance on how to convert in script.  Many thanks.

Labels (3)
1 Solution

Accepted Solutions
Or
MVP
MVP

Since you're using non-standard days (8 hours rather than 24), you'll presumably have to customize the handling using Floor() and Frac(). Interval() is meant to be the function here, but it uses 24 hour days, so you'll have to adjust the incoming data if you want to use it. Something like:

Interval(Floor(Value/28800)+(Frac(Value/28800)/3))

 

View solution in original post

2 Replies
Or
MVP
MVP

Since you're using non-standard days (8 hours rather than 24), you'll presumably have to customize the handling using Floor() and Frac(). Interval() is meant to be the function here, but it uses 24 hour days, so you'll have to adjust the incoming data if you want to use it. Something like:

Interval(Floor(Value/28800)+(Frac(Value/28800)/3))

 

43918084
Creator II
Creator II
Author

Thanks a lot for your expertise and guidance.  I think the reason for my expected value is based on 5 work day a week and working 8 hours a day.