I have a field 'WorkOrderNo' ,'Shift', 'Check_Time_Start'
![Sxbbb_0-1686560720272.png Sxbbb_0-1686560720272.png](https://community.qlik.com/t5/image/serverpage/image-id/109819i169B7422FFC02C24/image-size/medium?v=v2&px=400)
If Shift = 'Morning' I want Check_Time_Start subtracts with (06:00:00) to get a value between 06:00:00 and Check_Time_Start.
So I created two fields.
![Sxbbb_1-1686560978814.png Sxbbb_1-1686560978814.png](https://community.qlik.com/t5/image/serverpage/image-id/109820i523C4F210AEF8D5C/image-size/medium?v=v2&px=400)
![Sxbbb_3-1686561026430.png Sxbbb_3-1686561026430.png](https://community.qlik.com/t5/image/serverpage/image-id/109822i04D237C44AC76469/image-size/medium?v=v2&px=400)
I tried using the code : Check_Time_StartMachine - OverTimeMorning
Result :
![Sxbbb_4-1686561146488.png Sxbbb_4-1686561146488.png](https://community.qlik.com/t5/image/serverpage/image-id/109823i2A9F20AD6CA0641F/image-size/medium?v=v2&px=400)
if the time is between StartOverTimeMorning and OverTimeMornin 9 I want to the value to be 'Check_Time_StartMachine'
![Sxbbb_5-1686561547575.png Sxbbb_5-1686561547575.png](https://community.qlik.com/t5/image/serverpage/image-id/109824i4846F76B99631A47/image-size/medium?v=v2&px=400)