Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert HH/MM/SS into DD/HH/MM

Hello All,

I need to convert HH/MM/SS into DD/HH/MM (days/hour/minutes) in qlikview.

However, my 1 day should equal to 10 hours (working hours of the company) and not 24 hours.

Any suggestions please?

Many thanks for your help.

Kind Regards,

Hasvine

8 Replies
PrashantSangle

Hi,

convert your time into seconds and then divide it by 60*60*10 i.e. 36000 to get Day

regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Try this...

=Hour('20:30:40')/10+Minute('20:30:40')/600+Second('20:30:40')/36000

Thanks,

Vinod Kumar V

rbecher
MVP
MVP

As I understand it right 1 day shoud represent 10 hrs but hours, minutes and seconds should be equivalent?

Try this:

=Interval(Hour('20:30:40')+Minute('20:30:40')/60+Second('20:30:40')/3600, 'DD:HH:MM')

Astrato.io Head of R&D
swuehl
MVP
MVP

=dual( floor(interval#('22:35:40') / interval#('10:00:00')) & 'd ' & interval(fmod( interval#('22:35:40') ,Interval#('10:00:00')),'hh:mm'), Interval#('22:35:40'))

Take care of your format codes, 'MM' denotes month, not minutes.

rbecher
MVP
MVP

..had a mistake:

=Interval(Hour('20:30:40')/10+Minute('20:30:40')/1440+Second('20:30:40')/86400,'DD:hh:mm')

Astrato.io Head of R&D
MayilVahanan

Hi

Try like this

=Date(Date#(Floor(Hour('20:30:40') / 10)&':'& Mod(Hour('20:30:40'), 10)&':'&Minute('20:30:40'),'DD:HH:mm'),'DD:HH:mm')

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Hello !,

Thank you all for your help. The answer of swuehl is working great.

Thanks,

Hasvine

rbecher
MVP
MVP

..still not correct, but this (and much shorter):

=Interval(div(Interval#('15:30:40'),10/24)+fmod(Interval#('15:30:40'),10/24),'DD.hh:mm:ss')

Astrato.io Head of R&D