Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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