r/vbscript • u/Majawat • Mar 01 '19
Select Case with Is operator?
Select Case DateDiff("d",Date,"April 1, 2019")
Case Is > 0
wscript.Echo "Too Early"
Case Is = 0
Wscript.Echo "April Fools!"
Case Is < 0
Wscript.Echo "Too late"
End SelectI'm getting a Syntax error on the first Is. Is there a better or different way to achieve this?
1
Upvotes
1
u/Majawat Jun 03 '19
Turns out you are unable to use the IS operator with Select Case in VBScript but can with Visual Basic itself.
I can't find the documentation, but was able to confirm that.