<?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: Date Objects vs Date Strings in ColdFusion</title>
	<atom:link href="http://blog.stannard.net.au/2006/10/25/date-objects-vs-date-strings-in-coldfusion/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.stannard.net.au/2006/10/25/date-objects-vs-date-strings-in-coldfusion/</link>
	<description></description>
	<lastBuildDate>Sun, 08 Jan 2012 15:53:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Kevan Stannard</title>
		<link>http://blog.stannard.net.au/2006/10/25/date-objects-vs-date-strings-in-coldfusion/comment-page-1/#comment-1519</link>
		<dc:creator>Kevan Stannard</dc:creator>
		<pubDate>Sun, 06 Mar 2011 20:36:03 +0000</pubDate>
		<guid isPermaLink="false">#comment-1519</guid>
		<description>Hi Vijay, sorry, bit of a slow reply. Sounds like you need to use &lt;code&gt;createDateTime()&lt;/code&gt; rather than &lt;code&gt;createODBCDateTime()&lt;/code&gt;.

&lt;code&gt;createDateTime()&lt;/code&gt; creates a real date object

&lt;code&gt;createODBCDateTime()&lt;/code&gt; converts a real date object into an ODBC date string

In your case, perhaps you need something like this:

&lt;pre lang=&quot;cfml&quot;&gt;
&lt;cfset date = createDateTime(2011,3,7,9,15,0)&gt;
&lt;cfset formattedDate = dateFormat(date,&quot;mm/dd/yyyy-&quot;) &amp; &quot; &quot; &amp; timeFormat(date,&quot;h:mm tt&quot;)&gt;
&lt;cfoutput&gt;#formattedDate#&lt;/cfoutput&gt;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hi Vijay, sorry, bit of a slow reply. Sounds like you need to use <code>createDateTime()</code> rather than <code>createODBCDateTime()</code>.</p>
<p><code>createDateTime()</code> creates a real date object</p>
<p><code>createODBCDateTime()</code> converts a real date object into an ODBC date string</p>
<p>In your case, perhaps you need something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="cfml" style="font-family:monospace;">&lt;cfset date = createDateTime(2011,3,7,9,15,0)&gt;
&lt;cfset formattedDate = dateFormat(date,&quot;mm/dd/yyyy-&quot;) &amp; &quot; &quot; &amp; timeFormat(date,&quot;h:mm tt&quot;)&gt;
&lt;cfoutput&gt;#formattedDate#&lt;/cfoutput&gt;</pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: vijayvijay</title>
		<link>http://blog.stannard.net.au/2006/10/25/date-objects-vs-date-strings-in-coldfusion/comment-page-1/#comment-1494</link>
		<dc:creator>vijayvijay</dc:creator>
		<pubDate>Thu, 24 Feb 2011 16:04:44 +0000</pubDate>
		<guid isPermaLink="false">#comment-1494</guid>
		<description>I am using CreateODBCDateTime() function to create Simple format as 
(mm/dd/yyyy- h:mm tt).  But, when I am dumping the file, format is changing to 
{ts &#039;2011-08-06 00:00:00&#039;} . I want it to appear as formated. I have used DateFormat() along with CreateODBCDateTime().
Please help. Thanks in advance.

Vijay.</description>
		<content:encoded><![CDATA[<p>I am using CreateODBCDateTime() function to create Simple format as<br />
(mm/dd/yyyy- h:mm tt).  But, when I am dumping the file, format is changing to<br />
{ts &#8217;2011-08-06 00:00:00&#8242;} . I want it to appear as formated. I have used DateFormat() along with CreateODBCDateTime().<br />
Please help. Thanks in advance.</p>
<p>Vijay.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevan Stannard</title>
		<link>http://blog.stannard.net.au/2006/10/25/date-objects-vs-date-strings-in-coldfusion/comment-page-1/#comment-273</link>
		<dc:creator>Kevan Stannard</dc:creator>
		<pubDate>Wed, 31 Oct 2007 02:33:16 +0000</pubDate>
		<guid isPermaLink="false">#comment-273</guid>
		<description>Doh! Fixed!</description>
		<content:encoded><![CDATA[<p>Doh! Fixed!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastiaan</title>
		<link>http://blog.stannard.net.au/2006/10/25/date-objects-vs-date-strings-in-coldfusion/comment-page-1/#comment-272</link>
		<dc:creator>Sebastiaan</dc:creator>
		<pubDate>Wed, 31 Oct 2007 02:22:22 +0000</pubDate>
		<guid isPermaLink="false">#comment-272</guid>
		<description>Hi Kevan, I was referring to the typo (in the example you refer to in your retort). You set the year to be 2006 and then say it will print 2007 ;-) Silly of me to point out such a small thingy in a further excellent article, but hey, that&#039;s me!</description>
		<content:encoded><![CDATA[<p>Hi Kevan, I was referring to the typo (in the example you refer to in your retort). You set the year to be 2006 and then say it will print 2007 <img src='http://blog.stannard.net.au/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  Silly of me to point out such a small thingy in a further excellent article, but hey, that&#8217;s me!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevan Stannard</title>
		<link>http://blog.stannard.net.au/2006/10/25/date-objects-vs-date-strings-in-coldfusion/comment-page-1/#comment-271</link>
		<dc:creator>Kevan Stannard</dc:creator>
		<pubDate>Wed, 31 Oct 2007 01:41:50 +0000</pubDate>
		<guid isPermaLink="false">#comment-271</guid>
		<description>Hi Sebastiaan, did you mean &quot;23/10/2006&quot; for the display? Yes, this is stored internally as a string so prints out exactly as originally set.</description>
		<content:encoded><![CDATA[<p>Hi Sebastiaan, did you mean &quot;23/10/2006&quot; for the display? Yes, this is stored internally as a string so prints out exactly as originally set.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastiaan Naafs - van Dijk</title>
		<link>http://blog.stannard.net.au/2006/10/25/date-objects-vs-date-strings-in-coldfusion/comment-page-1/#comment-270</link>
		<dc:creator>Sebastiaan Naafs - van Dijk</dc:creator>
		<pubDate>Tue, 30 Oct 2007 06:15:36 +0000</pubDate>
		<guid isPermaLink="false">#comment-270</guid>
		<description>So the code:

&lt;cfset myDate = &quot;23/10/2006&quot;&gt;
&lt;cfoutput&gt;#myDate#&lt;/cfoutput&gt;

simply displays: 23/10/2007

********************************************

Does it really display this? ;-)</description>
		<content:encoded><![CDATA[<p>So the code:</p>
<p>&lt;cfset myDate = &quot;23/10/2006&quot;&gt;<br />
&lt;cfoutput&gt;#myDate#&lt;/cfoutput&gt;</p>
<p>simply displays: 23/10/2007</p>
<p>********************************************</p>
<p>Does it really display this? <img src='http://blog.stannard.net.au/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Hendel</title>
		<link>http://blog.stannard.net.au/2006/10/25/date-objects-vs-date-strings-in-coldfusion/comment-page-1/#comment-274</link>
		<dc:creator>Brian Hendel</dc:creator>
		<pubDate>Thu, 13 Sep 2007 06:22:54 +0000</pubDate>
		<guid isPermaLink="false">#comment-274</guid>
		<description>Very cool!  I&#039;ve noticed this issue a couple of times, and I will be parsing my dates manually whenever I can from now on.

-Brian</description>
		<content:encoded><![CDATA[<p>Very cool!  I&#8217;ve noticed this issue a couple of times, and I will be parsing my dates manually whenever I can from now on.</p>
<p>-Brian</p>
]]></content:encoded>
	</item>
</channel>
</rss>

