diegocastelazo Posted January 12, 2011 Share Posted January 12, 2011 Hi, I have the following problem:I have a variable, and in the expression I have the following:new Boolean(Date_1.getDate() > = Date_2.getDate()) ? "Yes" : "No"Date_1 = '6/10/10'Date_2 = '6/11/10'So if this is right, the answer to this expression should be "No", since the 6 of October 2010 is not greater or equal to 6 of November 2010, but I get "Yes".Why is this?Thanks Link to comment Share on other sites More sharing options...
madhuripatil Posted January 13, 2011 Share Posted January 13, 2011 It must be using mm/dd/yy format by default. Check by reversing the date values like:-Date_1 = '6/11/10'Date_2 = '6/10/10' Link to comment Share on other sites More sharing options...
ceday Posted January 13, 2011 Share Posted January 13, 2011 use Date.compareTo method to be safe. 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