How to subtract a working day

Epicor version 9.05.701

Does anyone know the syntax to subtract 1 working day?

Using dateadd function use -1 to substract.
DateAdd(day, -1, Today)

Look at your function…you have twice the date01… just use
DateAdd(day, -1, porel.Date01)

My apologies - but same error.

I suspect Date01 does not have a value,

But I looked at your original picture…this is a data directive. You should use ttPoRel.Date01 not PORel.Date01 I think. It is that way in version 10, I assume should be in version 9.
You are detecting if ttPORel.Date01 has changed… so there is a value…


1 Like

Hi, i get the same error when i use ttPoRel.Date01
i am on epicor version 9.05.701
Im not sure if the “DateAdd” function is compatible with this version