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

Help time range

Hi Guys, very new, so sorry if this is a stupid question.

I need to be able to select data in between specific hours of a selected day 05:00am and 15:00pm, Have no idea. do i need to create two time variables to do this and if so how do i go about it. Been on google for a while with no luck.

Ill carry on googling tomorrow , if i come right ill post it here but struggling.

1 Solution

Accepted Solutions
Not applicable
Author

Just to let you know how i fixed this. I did this by mapping the hours in the load script. Below is what i did.

[TEMP TIMERANGE]:

LOAD * INLINE [

    StartDate, EndDate, Shift

    05:00:00, 14:59:59, Shift A

    15:00:00, 23:59:59, Shift B

    24:00:00, 04:59:59, NoShift

];

[TIMERANGE]:

NoConcatenate Load

  Shift,

  MakeTime(Hour(StartDate), Minute(StartDate), Second(StartDate)) as StartDate,

  MakeTime(Hour(EndDate), Minute(EndDate), Second(EndDate)) as EndDate

Resident [TEMP TIMERANGE];

Drop Table [TEMP TIMERANGE];

Kind regards

View solution in original post

1 Reply
Not applicable
Author

Just to let you know how i fixed this. I did this by mapping the hours in the load script. Below is what i did.

[TEMP TIMERANGE]:

LOAD * INLINE [

    StartDate, EndDate, Shift

    05:00:00, 14:59:59, Shift A

    15:00:00, 23:59:59, Shift B

    24:00:00, 04:59:59, NoShift

];

[TIMERANGE]:

NoConcatenate Load

  Shift,

  MakeTime(Hour(StartDate), Minute(StartDate), Second(StartDate)) as StartDate,

  MakeTime(Hour(EndDate), Minute(EndDate), Second(EndDate)) as EndDate

Resident [TEMP TIMERANGE];

Drop Table [TEMP TIMERANGE];

Kind regards