I am trying to compare three datetime variables(actually these are arguments if it matters).
Variable1 = 01/05/2019 00:00:00
Variable2 = 01/10/2019 00:00:00
Variable3 = 01/31/2019 00:00:00
I wrote if statement below
If Variable1 <= Variable2 AndAlso Variable2 <= Variable3
Then message “successful”
Else message “failed”
From my understanding, “successful” should come up but I got “failed”.
I don’t know if using ‘<=‘ is the best way to compare datetime variables.
Could you help me to resolve this?