I have this code :
var dp:Array = new Array();
for ( var i:int = 0; i < e.result.length; i++ )
{
var row:Object = e.result[i];
dp.push( row );
}
The row object consists data for different columns of a datagrid. dp.push(row) pushes the data onto the datagrid.
Columns with index 3 and 4 have type of “DATE” with whole time stamp being displayed. Is there any method in flex which will help me extract the monnth/day/year from date or timestamp for that matter.
If yes, How do I do it in code.
Please help.
After re-reading your question, it sounds like you’re looking to change the display of the date object in the datagrid itself? For that, you should look at using a labelFunction for the DataGridColumn that is displaying the Date instance.
Or, alternatively, use the DateFormatter to format the date in the label function:
EDIT: Per comments, the combined approach code sample would look something like this: