5 Replies Latest reply on Mar 25, 2011 2:37 AM by _spoboyle

    How do I get a date formatter to work?

    Jerry62712 Level 1

      I know this is easy, but I'm hitting a block.  I have this code:

      ...

                      var date:Date = new Date();
                      var dateStrIn:String = date.toString();
                      var dateStrOut:String = dateFormat.format(dateStrIn);

      ...

       

      and I have this:

      ...
              <mx:DateFormatter id="dateFormat" formatString="MMM DD, YYYY  HH:MM" />
             
          </fx:Declarations>

      ...

       

      "date" has the current date as expected.  dateStrIn has the text of the date as expected.  dateStrOut is blank.