1 Reply Latest reply on May 30, 2009 5:55 AM by *Prashant Shelke*

    date format

    jfb00 Level 3

      Hi all,

      I have stored a date field as 'yyyy-mm-dd' in my database as nvarchar type.

      How can I change the date format to be display in a grid column?

      I'm using label function but it's not working.


              public function formatDate(item:Object, dc:DataGridColumn):String
                  if (item!=null){
                      return dateFormatter.format(item[dc.dataField]);
                      return "";


      <mx:DateFormatter id="dateFormatter"
              formatString="month: MM, day: DD, year: YYYY"/>


      <mx:DataGridColumn headerText="Schedule" dataField="scheduledate" labelFunction="formatDate" width="80"/>


      Or maybe to display as "April 29, 2009"

      any ideas?