Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to load 2 time periods as Dimensions from the TIME Dimension-
"MarketHours"
(=>08:00:00 and <=16:00:00) as MH
"AfterMarketHours"
(=>16:00:01 and <=23:59:59) as NMH
How would I do this in the load script?
Thanks in advance for your help!
Dan
If( Hour( MyTimeStampField) >= 8 and Hour( MyTimeStampField) <= 16, 'MarketHours', 'something else') as MH
If( Hour( MyTimeStampField) >16 and Hour( MyTimeStampField) <= 23, 'AfterMarketHours', 'something else') as NMH
Or perhaps:
If( Hour( MyTimeStampField) >= 8 and Hour( MyTimeStampField) <= 16,1, 0) as MH
If( Hour( MyTimeStampField) >16 and Hour( MyTimeStampField) <= 23,1,0) as NMH
Thank You Gysbert!
I ended up with a hybrid version of what you sent and it worked perfectly!
If(time(Time)>='07:59:00' and time(Time)<='16:00:00','Market Hours','After Market Hours') as [Market Hours],