1
    override public function set data(value:Object):void
    {

        super.data = value;

        if(data["date"] == ' ') 
        {

                var d:DateFormatter =  new DateFormatter();

                var month4:String = String(value);
                d.formatString = "MM-YY";

        data["date"] =d.format(DateFormatter.parseDateString(month4));
        }       



    }

I want to change the value which is coming from database as 2013-03-24 to 03/24/2013 please tell how to do that... I do not need any hard code?

ketan
  • 19,129
  • 42
  • 60
  • 98
ricky
  • 23
  • 1
  • 2
  • 14

1 Answers1

0

You don't need to format date, just add formatString property of dateField component like formatString="MM/DD/YYYY". It will display your date as provided format. Flex dateFiled component already have this functionality.