DataGrid中通用的日期显示格式




 <mx:Script>
	<![CDATA[
          private function  column_DateFormat(item:Object,column:DataGridColumn):String{
				var formatter:DateFormatter = new DateFormatter();
				formatter.formatString = "YYYY-MM-DD";
				
				return formatter.format(item[column.dataField]);
			}

 <mx:DataGridColumn dataField="testDate" headerText="测 试"  labelFunction="column_DateFormat" />

你可能感兴趣的:(actionscript)