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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to convert minutes into hh:mm ?

Hello Forum,

I am trying to figure out a way to convert time data in the form of minutes (starting at 0 at 0:00) into a time format of hh:mm (so e.g. 360 would = 6:00 , and 780 would = 13:00 etc).

I have tried to use the MakeTime formula, but I must be doing it wrong. My approach was this:

MakeTime(Floor(TIMEinMINUTES/60),60*((TIMEinMINUTES/60)-Floor(TIMEinMINUTES/60)))


Any suggestions and help would be greatly appreciated!

Thank you very much,

Ferdi

3 Replies
Not applicable
Author

How about using Mod and Div?

=MakeTime(Div(TimeInMinutes,60), Mod(TimeInMinutes,60))


disqr_rm
Partner - Specialist III
Partner - Specialist III

Try this:


time#(num(floor(TIMEinMINUTES/60), '00') & ':' & num(TIMEinMINUTES-(floor(TIMEinMINUTES/60)*60), '00'), 'hh:mm')


Just thought about what if you have TIMEinMINUTES = 10000? May be you want more sophisticated solution which can produce you in formaxt: "x days y hours and z minutes". Depends on what you trying to do. Anyway, you get the idea.

Not applicable
Author

Hi guys,

Thanks so much for your input!

Actually I just needed to step back for a second and breathe 🙂 The Coffee break brought enlightenment-

The solution is this: "TIMEinMINUTES"/60/24 and formated in hh:mm

Thanks again anyway, I really appreciate your help

🙂