Phaser Posted October 2, 2009 Share Posted October 2, 2009 Hi everyone I have been testing dates in a script I made, currently I am using this If @YEAR >= "2009" And @MON >= "11" Then And changing the @MON >= "11" to "10" gives me the msgbox I expect, I would like to also add @MDAY like this If @YEAR >= "2009" And @MON >= "11" And @MDAY >= "01" Then so its more accurate but it doesn't work with @MDAY added to it? what am I missing here? Link to comment Share on other sites More sharing options...
Zedna Posted October 2, 2009 Share Posted October 2, 2009 If @YEAR >= 2009 And @MON >= 11 And @MDAY >= 1 Then Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
jvanegmond Posted October 2, 2009 Share Posted October 2, 2009 (edited) The month is October, which is the 10th month.... This check will always fail this month: @MON >= "11".Also, you're "comparing" strings... If @YEAR >= 2009 And @MON >= 10 And @MDAY >= 1 Then Edited October 2, 2009 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
Phaser Posted October 2, 2009 Author Share Posted October 2, 2009 Thanks guys, the help file states @MDAY 01 to 31 so I didn't even bother trying 1 instead of 01, got the point about the strings, thanks Link to comment Share on other sites More sharing options...
jvanegmond Posted October 2, 2009 Share Posted October 2, 2009 That wasn't the problem. It was @MON >= 11 github.com/jvanegmond Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now