<?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/"
		>
<channel>
	<title>Comments on: Working with dates in Flex AIR and SQLite</title>
	<atom:link href="http://www.verysimple.com/blog/2008/09/09/working-with-dates-in-flex-air-and-sqlite/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.verysimple.com/blog/2008/09/09/working-with-dates-in-flex-air-and-sqlite/</link>
	<description>Custom Software Development</description>
	<lastBuildDate>Mon, 08 Mar 2010 16:27:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dates in Flex, AIR, SQLITE, And ActionScript &#171; Charlie&#39;s Flex Blog</title>
		<link>http://www.verysimple.com/blog/2008/09/09/working-with-dates-in-flex-air-and-sqlite/comment-page-1/#comment-114409</link>
		<dc:creator>Dates in Flex, AIR, SQLITE, And ActionScript &#171; Charlie&#39;s Flex Blog</dc:creator>
		<pubDate>Sat, 09 Jan 2010 21:01:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.verysimple.com/blog/?p=149#comment-114409</guid>
		<description>[...] you can safely store Dates as TEXT or DATE types in SQLITE, but if you store it as DATE, then AIR will convert the date value to the DOUBLE format (julian date), which for most humans is not readable as a [...]</description>
		<content:encoded><![CDATA[<p>[...] you can safely store Dates as TEXT or DATE types in SQLITE, but if you store it as DATE, then AIR will convert the date value to the DOUBLE format (julian date), which for most humans is not readable as a [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.verysimple.com/blog/2008/09/09/working-with-dates-in-flex-air-and-sqlite/comment-page-1/#comment-111556</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Mon, 19 Oct 2009 17:04:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.verysimple.com/blog/?p=149#comment-111556</guid>
		<description>Hey Tim, try running you query directly using something like &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/5817&quot; rel=&quot;nofollow&quot;&gt;SQL Query Manager&lt;/a&gt; first.  If it runs fine there, then you can look further into AIR.  It sounds like you may just have an error in your SQL statement, though.</description>
		<content:encoded><![CDATA[<p>Hey Tim, try running you query directly using something like <a href="https://addons.mozilla.org/en-US/firefox/addon/5817" rel="nofollow">SQL Query Manager</a> first.  If it runs fine there, then you can look further into AIR.  It sounds like you may just have an error in your SQL statement, though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.verysimple.com/blog/2008/09/09/working-with-dates-in-flex-air-and-sqlite/comment-page-1/#comment-111482</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Thu, 15 Oct 2009 23:20:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.verysimple.com/blog/?p=149#comment-111482</guid>
		<description>I am getting the error on a SELECT query and none of the tables has any kind of date column. The datatypes are:

int
varchar(255)
varchar(1)
bit
varchar(50)
varchar(8)</description>
		<content:encoded><![CDATA[<p>I am getting the error on a SELECT query and none of the tables has any kind of date column. The datatypes are:</p>
<p>int<br />
varchar(255)<br />
varchar(1)<br />
bit<br />
varchar(50)<br />
varchar(8)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.verysimple.com/blog/2008/09/09/working-with-dates-in-flex-air-and-sqlite/comment-page-1/#comment-110245</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Thu, 10 Sep 2009 16:58:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.verysimple.com/blog/?p=149#comment-110245</guid>
		<description>Hey Hermanshu, I&#039;m not as familiar with using JavaScript in AIR apps.  If you got an object back, you might inspect it to see if it&#039;s some type of date structure, in which case you don&#039;t need to do any of manipulation in your query.</description>
		<content:encoded><![CDATA[<p>Hey Hermanshu, I&#8217;m not as familiar with using JavaScript in AIR apps.  If you got an object back, you might inspect it to see if it&#8217;s some type of date structure, in which case you don&#8217;t need to do any of manipulation in your query.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hemanshu Bhojak</title>
		<link>http://www.verysimple.com/blog/2008/09/09/working-with-dates-in-flex-air-and-sqlite/comment-page-1/#comment-108129</link>
		<dc:creator>Hemanshu Bhojak</dc:creator>
		<pubDate>Fri, 24 Jul 2009 06:29:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.verysimple.com/blog/?p=149#comment-108129</guid>
		<description>I am trying to insert a date in the db from javascript using parameters. The date inserts fine, but when I retrieve the data the date is returned as an object. I also tried formatting the date using the STRFTIME, but that returns null.</description>
		<content:encoded><![CDATA[<p>I am trying to insert a date in the db from javascript using parameters. The date inserts fine, but when I retrieve the data the date is returned as an object. I also tried formatting the date using the STRFTIME, but that returns null.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.verysimple.com/blog/2008/09/09/working-with-dates-in-flex-air-and-sqlite/comment-page-1/#comment-100541</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Tue, 21 Apr 2009 18:56:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.verysimple.com/blog/?p=149#comment-100541</guid>
		<description>Hey Alex, it looks like you do have a julian date there, did you make sure your sqlite column type/affinity is &quot;date&quot; or &quot;datetime&quot; ?  even though those column types are not technically recognized by sqlite, AIR does internally rely on them.</description>
		<content:encoded><![CDATA[<p>Hey Alex, it looks like you do have a julian date there, did you make sure your sqlite column type/affinity is &#8220;date&#8221; or &#8220;datetime&#8221; ?  even though those column types are not technically recognized by sqlite, AIR does internally rely on them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Araujo</title>
		<link>http://www.verysimple.com/blog/2008/09/09/working-with-dates-in-flex-air-and-sqlite/comment-page-1/#comment-100474</link>
		<dc:creator>Alex Araujo</dc:creator>
		<pubDate>Mon, 20 Apr 2009 22:05:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.verysimple.com/blog/?p=149#comment-100474</guid>
		<description>Today, I&#039;m using this technique but today my application just breaked and I don&#039;t know what to do to resolve the following issue:

Type Coercion failed: cannot convert 2454942.2072685184 to Date

Any tips? Thanks!</description>
		<content:encoded><![CDATA[<p>Today, I&#8217;m using this technique but today my application just breaked and I don&#8217;t know what to do to resolve the following issue:</p>
<p>Type Coercion failed: cannot convert 2454942.2072685184 to Date</p>
<p>Any tips? Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Norm</title>
		<link>http://www.verysimple.com/blog/2008/09/09/working-with-dates-in-flex-air-and-sqlite/comment-page-1/#comment-100382</link>
		<dc:creator>Norm</dc:creator>
		<pubDate>Sun, 19 Apr 2009 22:43:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.verysimple.com/blog/?p=149#comment-100382</guid>
		<description>Just wanted to say thanks for the post. Really helped save some time!</description>
		<content:encoded><![CDATA[<p>Just wanted to say thanks for the post. Really helped save some time!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.verysimple.com/blog/2008/09/09/working-with-dates-in-flex-air-and-sqlite/comment-page-1/#comment-97085</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Fri, 20 Mar 2009 18:30:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.verysimple.com/blog/?p=149#comment-97085</guid>
		<description>Thanks for stopping by Paul.  I should update this post a bit because I&#039;ve since learned quite a lot more about list item renderers.  

I&#039;ve found that you can actually make the DateField more reliable in a DataGrid by extending the DateField class and overriding the &quot;data&quot; getter/setter.  The problem happens in DateField.data setter where it detects &quot;_listData is DataGridListData&quot; and then craps out with a Type Coercion.  If you extend DateField then you can override data and parse/cast the value however you like.

Your link definitely cleared up some suspicions I had about the column affinity.  It also kinda blew my mind that you guys built in XML and Object column types, which has my curiosity.

It&#039;s interesting how SQLite is documented so that it just looks for keywords.  ie varchar(25) or varchar(10) both contain &quot;char&quot; so SQLite treats it as text. [http://www.sqlite.org/datatype3.html]  So, perhaps it is the same with &quot;date&quot; meaning that &quot;datetime&quot; and &quot;date&quot; would both trigger to AIR that the column affinity is a date?

Thanks again.</description>
		<content:encoded><![CDATA[<p>Thanks for stopping by Paul.  I should update this post a bit because I&#8217;ve since learned quite a lot more about list item renderers.  </p>
<p>I&#8217;ve found that you can actually make the DateField more reliable in a DataGrid by extending the DateField class and overriding the &#8220;data&#8221; getter/setter.  The problem happens in DateField.data setter where it detects &#8220;_listData is DataGridListData&#8221; and then craps out with a Type Coercion.  If you extend DateField then you can override data and parse/cast the value however you like.</p>
<p>Your link definitely cleared up some suspicions I had about the column affinity.  It also kinda blew my mind that you guys built in XML and Object column types, which has my curiosity.</p>
<p>It&#8217;s interesting how SQLite is documented so that it just looks for keywords.  ie varchar(25) or varchar(10) both contain &#8220;char&#8221; so SQLite treats it as text. [http://www.sqlite.org/datatype3.html]  So, perhaps it is the same with &#8220;date&#8221; meaning that &#8220;datetime&#8221; and &#8220;date&#8221; would both trigger to AIR that the column affinity is a date?</p>
<p>Thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Robertson</title>
		<link>http://www.verysimple.com/blog/2008/09/09/working-with-dates-in-flex-air-and-sqlite/comment-page-1/#comment-96981</link>
		<dc:creator>Paul Robertson</dc:creator>
		<pubDate>Thu, 19 Mar 2009 18:26:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.verysimple.com/blog/?p=149#comment-96981</guid>
		<description>I&#039;ve used ActionScript Date objects directly, without any problems either inserting or retrieving the data.

I think the difference is that I create the column with a declared data type &quot;Date&quot; (or &quot;DATE&quot;) rather than &quot;DATETIME&quot;. If you use &quot;Date&quot; then AIR knows you&#039;re going to be using ActionScript Date objects, and it does all the conversion automatically for you.

I assume the reason you&#039;re using DATETIME is because you have an existing SQLite database or you&#039;re reusing code from another app... If not, I&#039;d suggest just using Date rather than DATETIME.

This information is in the documentation -- although perhaps a bit buried:

http://livedocs.adobe.com/flex/3/langref/localDatabaseSQLSupport.html#columnAffinity

Paul Robertson
Adobe AIR team
(I&#039;m the person who wrote the documentation for the SQLite feature)</description>
		<content:encoded><![CDATA[<p>I&#8217;ve used ActionScript Date objects directly, without any problems either inserting or retrieving the data.</p>
<p>I think the difference is that I create the column with a declared data type &#8220;Date&#8221; (or &#8220;DATE&#8221;) rather than &#8220;DATETIME&#8221;. If you use &#8220;Date&#8221; then AIR knows you&#8217;re going to be using ActionScript Date objects, and it does all the conversion automatically for you.</p>
<p>I assume the reason you&#8217;re using DATETIME is because you have an existing SQLite database or you&#8217;re reusing code from another app&#8230; If not, I&#8217;d suggest just using Date rather than DATETIME.</p>
<p>This information is in the documentation &#8212; although perhaps a bit buried:</p>
<p><a href="http://livedocs.adobe.com/flex/3/langref/localDatabaseSQLSupport.html#columnAffinity" rel="nofollow">http://livedocs.adobe.com/flex/3/langref/localDatabaseSQLSupport.html#columnAffinity</a></p>
<p>Paul Robertson<br />
Adobe AIR team<br />
(I&#8217;m the person who wrote the documentation for the SQLite feature)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
