Hi there.
I have an expression within a query which calculates the due date of a project based on the date it was instructed and the time it was instructed.
Due: Switch([Day]<4 And [Hours]<13, DateAdd("d",2,[Instruction Date])[, [Day]<4 And [Hours]>13, DateAdd("d",3,[Instruction Date])[,[Day] =4 or =5 And [Hours]<13,DateAdd("d",4,[Instruction Date])[,[Day] =4 or =5 And [Hours]>13,DateAdd("d",5,[Instruction Date]) ]]])
[Day] is a pre-calculated field where it calculates the day of the week in a number from 1 to 7 based on the instruction date.
[Hours] is a pre-calculated field where it includes only the hour from the time of the instruction.
[Instruction Date] is the date of instruction... pretty simple.
---
I keep getting an invalid syntax error when trying to run.
It says, "you may have entered an operand without an operator."
Any ideas?
Andy