3 Replies Latest reply on Dec 1, 2013 5:56 PM by Ned Murphy

    how to get system date in as2

    bbxrider1 Level 1

      this is not working


      var currDate:Date = new Date();

      txtTest.text = currDate; box is empty


      also when I find something that works, to parse out yyyy mm and dd

      I have seen these examples, not sure at this point which one would work or both?

      var currentDate=new Date();

      var month=currentDate.getMonth();

      var day=currentDate.getDate();

      var year=currentDate.getFullYear();


      var mm = currentDate.month

      var yyyy = currentDate.fullyear

      var dd = currentDate.day


      I need to assemble the date like this: yyyymmdd, using it for date compares