Skip to main content
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
Showing results for 
Search instead for 
Did you mean: 

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 (7)
1 Reply
Partner - Specialist
Partner - Specialist

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








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