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: 
nishanthi_8
Creator
Creator

Converting number into hours and minutes

Hi,

I have  20.66 in number format i want to convert it into hours and minutes i .e is 21:6 .any solution for this .

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Interval( MyNumber / 24 , 'hh:mm')


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
Gysbert_Wassenaar

Interval( MyNumber / 24 , 'hh:mm')


talk is cheap, supply exceeds demand
Anonymous
Not applicable

Time(  COMP_DAILY_ID,'HH:MM')

stigchel
Partner - Master
Partner - Master

Something like this

Time((Left(20.66,2)*60+right(20.66,2))

/(24*60)

,'hh:mm')

stigchel
Partner - Master
Partner - Master

I should add that it might very well be that Gysbert's solution is correct and that your assumption the outcome should be 21:06 is wrong. My suggestion results in your stated expected outcome, but 20.66 as a number would be a weird notation for that. Where did it come from?

nishanthi_8
Creator
Creator
Author

the number should be converted is what i mean

Digvijay_Singh

=text(subfield('20.66','.',1)+ div(SubField('20.66','.',2),60)) & ':' & mod(SubField('20.66','.',2),60)