Forum Discussion
jhaldane
8 years agoFrequent Visitor
Group Days and create shifts
Please can you assist me (step by step) Please can you show me how to group into days and then create three shifts. i.e. I have many rows for the 1st May all with different times. Then group times ...
- 8 years ago
Hi jhaldane,
Month = Test_3[Dates].[MonthNo] Day = Test_3[Dates].[Day] Time = FORMAT(Test_3[Dates] ,"hh:mm:ss") Shift = IF ( Test_3[Time] >= TIME ( 6, 0, 0 ) && Test_3[Time] < TIME ( 14, 0, 0 ), "Shift1", IF ( Test_3[Time] >= TIME ( 14, 0, 0 ) && Test_3[Time] < TIME ( 22, 0, 0 ), "Shift2", "Shift3" ) )Best regards,
Yuliana Gu
v-yulgu-msft
Microsoft Employee
8 years agoHi jhaldane,
Month = Test_3[Dates].[MonthNo]
Day = Test_3[Dates].[Day]
Time = FORMAT(Test_3[Dates] ,"hh:mm:ss")
Shift =
IF (
Test_3[Time] >= TIME ( 6, 0, 0 )
&& Test_3[Time] < TIME ( 14, 0, 0 ),
"Shift1",
IF (
Test_3[Time] >= TIME ( 14, 0, 0 )
&& Test_3[Time] < TIME ( 22, 0, 0 ),
"Shift2",
"Shift3"
)
)
Best regards,
Yuliana Gu
ncav36
7 years agoNew Member
Hi, this does not work for me. I have been trying this for about 30 minutes, and it continues to give me an error "cannot convert value " of type Text to type Date" when I try to convert the text to "time" as displayed in your example. Can you help? I've done EXACTLY what you've suggested here. Thanks.