hi all In my web application i am allowing the user to enter from date/Time and To date/Time in the below format. MM/DD/YYYY mm:HH:ss i am acheiving above functionality, using some Javascript (Datepicker.js)that already exists.
I wrote the function my self to compare the From and to date and validating the From date to be less than to date.
I am comparing the date by splitting the above format to different pieces using split functions. The problem i am facing is when i compare my from date with to date it returns some bizzare results
from date 7; to date 14 7>14 returns true;
from date 17; to date 21 17>21 returns false;
i am getting problem whenever i am comparing the single digit with two digit say 8>12 ; 3>12; . I thought the problem might be due to some extra spaces but that not so. i checked the length it returns 1;