Hi i am trying to create a import scenario for purchase order screen. Everything works fine But when i am trying to -1 from date its showing me errors. What i want is to create PO with -1 date. For example if i am creating PO by import scenario so date will be yesterday not today.


Please ignore date formula above. I was just trying this. Can anyone guide me on how to write this
=DateAdd('d', -1, CDate(Left(Right([ORDER DATE],4),2) + '/' + Right([ORDER DATE],2) + '/' + Left([ORDER DATE],4)))
Error :
An error occurred while executing the DateAdd(Const(d), UnaryOp: - (Const(1)), CDate(BinaryOp + (BinaryOp + (BinaryOp + (BinaryOp + (Left(Right(Identifier(ORDER DATE), Const(4)), Const(2)), Const(/)), Right(Identifier(ORDER DATE), Const(2))), Const(/)), Left(Identifier(ORDER DATE), Const(4))))) function. Type mismatch in the argument 1 of the DateAdd() function: The argument must have the DateTime type.