Hi friends,
Below is the code I wrote for a macro.
$DurationCalculation
if (Variable_Name <= 3) {
(DateOfInterview - DateOfArrival)?.TotalDays;
} else {
(DateOfDeparture - DateOfInterview)?.TotalDays;
}
What I want is to placed this macro in a variable (expression field) so that the duration of stay is calculated according to the choice of the survey point but it is not working.
My questions
- Is there any mistake in my code, if yes can anyone help correcting?
- If not, what is wrong?
Thank you!