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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
crichter14
Creator II
Creator II

Time Intervals and Conversions to Buckets

I searching through the forums to find an example that will work, I'm having a hard time finding something that's not an exact 4 hour interval though.  Here's my situation:

1)  I get a timestamp that's in GMC, I need to:

a.  Convert to CST.   I don't have an issue with this.  using:  time(ConvertToLocalTime(LogTimeStamp,'Central Time (US & Canada)')) to make this work.

b.  Take into account Daylight Savings Time (DST).   I think the conversion in a will keep the DST in mind.

c.  Bucket the times (dates do not matter) into specific groupings.

MAR-OCT US     24 Time     
03:30 AM             03:30          
11:00 AM             11:00          
03:30 PM             15:30          
06:30 PM             18:30          
11:30 PM             23:30          
 

The groupings have me confounded.  I just want to bucket between the each time frame for example:

Bucket 1 03:30 AM to 10:59 AM, Bucket 2 11:00 AM to 3:29 AM, etc.

Any guidance would be appreciated.

Labels (2)
1 Reply
albertovarela
Partner - Specialist
Partner - Specialist

Take a look at the attached qvf. I used the "Previous" function...  Here's the output:

2021-08-10_11-00-43.png

 

 

 

 

 

 

As for the DST,  check out the 3rd argument on the "ConvertToLocalTime" function