Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a dates table like this:
ID | Date1 | Date2 |
---|---|---|
1 | 21/05/2018 | 30/06/2019 |
2 | 15/01/2018 | 31/12/2018 |
3 | 24/04/2018 | Missing |
4 | 10/02/2018 | 01/01/2018 |
5 | 17/04/2018 | Missing |
How can I write an IF statement where it is something like IF(Date1<=Date,ID)
But also to add a clause where it excludes dates from Date2 field where they are classified as "Missing"?
May be this
If(Date1 <= Date2 and Date2 <> 'Missing', ID)
Or if Missing means null, then this
If(Date1 <= Date2 and Len(Trim(Date2)) > 0, ID)