Thank you Brian, that worked. starting to understand this stuff a litte more each day...
--- In [email protected], "Brian Holmes" <[EMAIL PROTECTED]> wrote: > > Roger, > Use the following function. > > > > public function > gridDateFormatter(item:Object,column:DataGridColumn):String > { > var f:DateFormatter = new DateFormatter(); > f.formatString = "DD-MMM-YYYY"; > return f.format(item[column.dataField]); > } > > > > Then on your grid column set the labelfucntion like: > > <mx:DataGridColumn dataField="date" headerText="Dated" > labelFunction="gridDateFormatter" /> > > > > Change the format string to match the format you need. > > > B. > > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of Roger Ross > Sent: Wednesday, January 31, 2007 2:30 PM > To: [email protected] > Subject: [flexcoders] date formating > > Hello, > > I have a date field in a grid. > what is the correct syntax to get it to display MM/DD/YYYY right now it > displays as Wed Jan 30 00:00:00 GMT > > I have <mx:DateFormatter id="df" formatString="MM/DD/YYYY"/> as my date > format and I added the syntax to the datafield > dataField="{df.format(entrydate)}" > > But this just gives me an error. > > I found how to do it on a label but I need it formated in a grid > column.. > > Thank you > > Roger > > > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.com > Yahoo! Groups Links > > > > > > *** > The information in this e-mail is confidential and intended solely for the individual or entity to whom it is addressed. If you have received this e-mail in error please notify the sender by return e-mail delete this e-mail and refrain from any disclosure or action based on the information. > *** >

