Conditional If Statement handling "null"
Hi,
If I try to use a conditional if statement it will not let me use "null", like:
- input.Date_Field = if(input.Other_Date_Field != null, input.Other_Date_Field.addday(2),null);
I get "Both the argument should be same type for 'IF' task. Expecting 'IF' expression found 'TIMESTAMP' expression"
But I can write a normal if statement like:
- if input.Other_Date_Field != null
- {
- input.Date_Field = input.Other_Date_Field.addday(2);
- }
- else
- {
- input.Date_Field = null;
- }
Please allow for "null" in conditional if statements where appropriate.
Thanks,
Damien Cregan
Hire an Expert