Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Retrieve Hour value from Date Field

I have a field that contains a date in the following format: 24/12/2002 12:31:00 AM

I need to be able to determine the hour that this occurred in.

Thanks in advance.

2 Replies
Anonymous
Not applicable
Author

Here's a solution that takes into consideration a value like 5pm and returns 17 instead of 5, which would easily be mixed up with 5am:

=interval(frac(timestamp(timestamp#('24/12/2002 5:31:00 PM', 'DD/MM/YYYY hh:mm:ss TT'),'DD/MM/YYYY hh:mm:ss')), 'hh')

Not applicable
Author

Thanks works a treat.