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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

seconds in days (8hrs)

Hello All

I Have column "TIMESPENT" (This column contains seconds)

in my case below one shows(TIMESPENT=127200 seconds) 35h 20min same want see in days like 4 days 3 h 20 min

FLOOR((AVG(TIMESPENT)/3600))&'h'&ROUND(MOD(ROUND(AVG(TIMESPENT)),3600)/60)&'min'




Thanks & Regards,

Nagesh

1 Solution

Accepted Solutions
sunny_talwar

May be this:

=Floor(127200/28800) & 'day(s) ' & Floor(Mod(127200, 28800)/(60*60)) & 'hr(s) ' & Floor(Mod(Mod(127200, 28800), 3600)/60) & 'min(s)'

=Floor(TIMESPENT/28800) & 'day(s) ' & Floor(Mod(TIMESPENT, 28800)/(60*60)) & 'hr(s) ' & Floor(Mod(Mod(TIMESPENT, 28800), 3600)/60) & 'min(s)'

View solution in original post

3 Replies
sunny_talwar

May be like this:

=Replace(Replace(Replace(Interval(127200/86400, 'D X h U mm Z'), 'X', 'day(s)'), 'U', 'hour(s)'), 'Z', 'min(s)')

=Replace(Replace(Replace(Interval(TIMESPENT/86400, 'D X h U mm Z'), 'X', 'day(s)'), 'U', 'hour(s)'), 'Z', 'min(s)')

Anonymous
Not applicable
Author

Hi Sunny  Good Mng!

=Replace(Replace(Replace(Interval(127200/86400, 'D X h U mm Z'), 'X', 'day(s)'), 'U', 'hour(s)'), 'Z', 'min(s)')


here Day taking 24 hrs, i want to calculate day as 8hrs only




Regards,

Nagesh

sunny_talwar

May be this:

=Floor(127200/28800) & 'day(s) ' & Floor(Mod(127200, 28800)/(60*60)) & 'hr(s) ' & Floor(Mod(Mod(127200, 28800), 3600)/60) & 'min(s)'

=Floor(TIMESPENT/28800) & 'day(s) ' & Floor(Mod(TIMESPENT, 28800)/(60*60)) & 'hr(s) ' & Floor(Mod(Mod(TIMESPENT, 28800), 3600)/60) & 'min(s)'