Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
apthansh
Creator
Creator

Convert Minutes/Hours to number

Hi - I have hours in the below format.When I do sum of hours I get zero.Do I have to convert this format ??

Hours.JPG

Thanks much.

1 Solution

Accepted Solutions
sunny_talwar

With slight modifications in the script... I am seeing the same result

Capture.PNG

View solution in original post

10 Replies
Anil_Babu_Samineni

Simply Num(FieldName) not working for you?

I mean Sum(Num(FieldName)) is not working for you?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
sunny_talwar

Yes, it would be better if you use Interval() on top of Sum()

Interval(Sum(...), 'D hh:mm:ss')

sasiparupudi1
Master III
Master III

Sum(Time(Time#(YourField,'hh:mm'),'hh'))

apthansh
Creator
Creator
Author

Thank you all but all these expressions are giving me 3 in Qliksense where as 13 in Qlikview with the same expression.

Should be same in both correct ?

stalwar1sasiparupudi1anilbabu

sunny_talwar

Without seeing qvw and qvf... it would be difficult to say... but the difference could be because of many different things. Just to list few

1) Different field formats

2) Different soruces

3) Different data

4) Different expressions

5) Different environmental variables

etc etc....

jmvilaplanap
Specialist
Specialist

Hi,

Probably you must to convert the time to number with "time#(field, 'hh:mm')", try this.

apthansh
Creator
Creator
Author

stalwar1‌ - I have attached the source file ,QVW & QVF ....

sunny_talwar

With slight modifications in the script... I am seeing the same result

Capture.PNG

apthansh
Creator
Creator
Author

As always you are awesome