Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
If(RECEIPT_DATE_WORKING < GATE_RCPT_DATE_WORKING,0,
IF(FLOOR(RECEIPT_DATE)<=Floor(GATE_RCPT_DATE_WORKING)+IF(WeekDay(GATE_RCPT_DATE_WORKING)='Fri',3,
IF(WeekDay(GATE_RCPT_DATE_WORKING)='Sat',2,1)),1,0)) AS Score
If you need an explanation of the expression (I presume that you haven't created the expresssion yourself), it could be like this:
A Score is calculated where:
it will be 0 if the RECEIPT_DATE_WORKING is less than the GATE_RCPT_DATE_WORKING on on a date and time basis.
it will be 0 if the RECEIPT_DATE (not taking time within the date into consideration) is less or equal than the RCPT_DATE_WORKING (no time part considered) with this date pushed forward to the following Monday if the RPCT_DATE_WORKING is a Friday or Saturday.
it will be 1 if the RECEIPT_DATE (not taking time within the date into consideration) is greater than the RCPT_DATE_WORKING (no time part considered) with this date pushed forward to the following Monday if the RPCT_DATE_WORKING is a Friday or Saturday.