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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Ramu_i
Creator II
Creator II

AM, PM time based find the hr difference

Hi All,

I have time filed

Time 

1 AM to 2 PM 

2 PM to 3 AM , 6 AM to 11 PM

4 AM to 6 AM 

How to find the hr between AM and PM

Out put is 

Hr Time 

13 hr

18 hr

2 hr 

 

Thanks advance.

Ram

1 Solution

Accepted Solutions
rwunderlich
MVP
MVP

=Interval(Time#(SubField(TimeField, ' to ', 2), 'hh TT')

- Time#(SubField(TimeField, ' to ', 1), 'hh TT'), 'h') & ' hr'

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

View solution in original post

2 Replies
rwunderlich
MVP
MVP

=Interval(Time#(SubField(TimeField, ' to ', 2), 'hh TT')

- Time#(SubField(TimeField, ' to ', 1), 'hh TT'), 'h') & ' hr'

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

Ramu_i
Creator II
Creator II
Author

Hi Rwuderlich,

Thanks for solution.

I got solution.

 

Thanks & Regards,

Ram