<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: How to sort dates correctly with a datagrid column</title>
	<atom:link href="http://ripoblet.wordpress.com/2008/06/11/how-to-sort-dates-correctly-with-a-datagrid-column/feed/" rel="self" type="application/rss+xml" />
	<link>http://ripoblet.wordpress.com/2008/06/11/how-to-sort-dates-correctly-with-a-datagrid-column/</link>
	<description>Adobe Flex, ActionScript 3, etc...</description>
	<lastBuildDate>Fri, 31 Oct 2008 06:57:30 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: andhapp</title>
		<link>http://ripoblet.wordpress.com/2008/06/11/how-to-sort-dates-correctly-with-a-datagrid-column/#comment-10</link>
		<dc:creator>andhapp</dc:creator>
		<pubDate>Fri, 18 Jul 2008 20:05:08 +0000</pubDate>
		<guid isPermaLink="false">http://ripoblet.wordpress.com/?p=11#comment-10</guid>
		<description>If you are using flex 2...can you not just use sortable = true inside your DataGridColumn tag and as far as the date formatting is considered use the dateFormatter like this:

1) Define a private function
private function dateLabel(item:Object, column: DataGridColumn) : String {
                return dateFormatter.format(item[column.dataField]);    
            }


2) In the DataGridColumn just add labelFunction=&quot;dateLabel&quot;

This gives you freedome to choose the format you like...</description>
		<content:encoded><![CDATA[<p>If you are using flex 2&#8230;can you not just use sortable = true inside your DataGridColumn tag and as far as the date formatting is considered use the dateFormatter like this:</p>
<p>1) Define a private function<br />
private function dateLabel(item:Object, column: DataGridColumn) : String {<br />
                return dateFormatter.format(item[column.dataField]);<br />
            }</p>
<p>2) In the DataGridColumn just add labelFunction=&#8221;dateLabel&#8221;</p>
<p>This gives you freedome to choose the format you like&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
