1 Reply Latest reply on Jul 10, 2009 3:48 PM by kglad

    Issues with reading the date

    Rabel

      I have a piece that goes through a schedule, the first part it checks is the date which I thought I had figured out until today came. What I was doing was I create a var from the date that looks like this
      newday=month+"."+day+"."+year
      and that would give me 7.10.2009
      then I have a code that checks against my xml file with dates like
      7.4.2009
      7.5.2009
      7.8.2009

      and the code

      if (_root.newday<tester.date) {
      blahblahblah
      }

      tester.date is the numbers above.
      And that worked good until today when now it is displaying the dates for 7.2.2009, I guess this is because it reads it as a complete number and flash reads that 7.2 should come after 7.10. I tried switching to "-" and "/" instead of "." and nothing seems to be working. I would like to not change much code, but I think I may need to go through each part I guess check month then check day then year. Please give me your ideas on what I can do here.

      Randy