<?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: SQL Date Math and the Leap Year</title>
	<atom:link href="http://www.lifeaftercoffee.com/2006/11/27/sql-date-math-and-the-leap-year/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lifeaftercoffee.com/2006/11/27/sql-date-math-and-the-leap-year/</link>
	<description>because I don't believe in life before coffee...</description>
	<lastBuildDate>Wed, 23 Nov 2011 03:01:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jon Emmons</title>
		<link>http://www.lifeaftercoffee.com/2006/11/27/sql-date-math-and-the-leap-year/comment-page-1/#comment-13358</link>
		<dc:creator>Jon Emmons</dc:creator>
		<pubDate>Wed, 29 Nov 2006 01:07:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.lifeaftercoffee.com/2006/11/27/sql-date-math-and-the-leap-year/#comment-13358</guid>
		<description>That&#039;s even better Ying!  So for the leap year here&#039;s the result:

&lt;code&gt;SQL&gt; SELECT Add_Months(to_date(&#039;02/29/2004&#039;, &#039;MM/DD/YYYY&#039;), 12) from dual;

ADD_MONTH
---------
28-FEB-05&lt;/code&gt;

Thanks for sharing your solution.</description>
		<content:encoded><![CDATA[<p>That&#8217;s even better Ying!  So for the leap year here&#8217;s the result:</p>
<p><code>SQL> SELECT Add_Months(to_date('02/29/2004', 'MM/DD/YYYY'), 12) from dual;</p>
<p>ADD_MONTH<br />
---------<br />
28-FEB-05</code></p>
<p>Thanks for sharing your solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary Withrow</title>
		<link>http://www.lifeaftercoffee.com/2006/11/27/sql-date-math-and-the-leap-year/comment-page-1/#comment-13259</link>
		<dc:creator>Gary Withrow</dc:creator>
		<pubDate>Tue, 28 Nov 2006 21:00:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.lifeaftercoffee.com/2006/11/27/sql-date-math-and-the-leap-year/#comment-13259</guid>
		<description>Nice try APC, unfortunately 1999 did not have a 2/29 date:

select to_date(&#039;01-Mar-1999&#039;,&#039;DD-MON-YYYY&#039;)-1 from dual

returns 28-Feb-1999...</description>
		<content:encoded><![CDATA[<p>Nice try APC, unfortunately 1999 did not have a 2/29 date:</p>
<p>select to_date(&#8217;01-Mar-1999&#8242;,&#8217;DD-MON-YYYY&#8217;)-1 from dual</p>
<p>returns 28-Feb-1999&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: APC</title>
		<link>http://www.lifeaftercoffee.com/2006/11/27/sql-date-math-and-the-leap-year/comment-page-1/#comment-13185</link>
		<dc:creator>APC</dc:creator>
		<pubDate>Tue, 28 Nov 2006 12:34:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.lifeaftercoffee.com/2006/11/27/sql-date-math-and-the-leap-year/#comment-13185</guid>
		<description>Sorry.  Leap years hit this one too.
&lt;code&gt;
SQL&gt; SELECT Add_Months(to_date(&#039;29-FEB-1999&#039;, &#039;DD-MON-YYYY&#039;),12) FROM dual
  2  /
SELECT Add_Months(to_date(&#039;29-FEB-1999&#039;, &#039;DD-MON-YYYY&#039;),12) FROM dual
                          *
ERROR at line 1:
ORA-01839: date not valid for month specified


SQL&gt; 
&lt;/code&gt;
Cheers, APC</description>
		<content:encoded><![CDATA[<p>Sorry.  Leap years hit this one too.<br />
<code><br />
SQL&gt; SELECT Add_Months(to_date('29-FEB-1999', 'DD-MON-YYYY'),12) FROM dual<br />
  2  /<br />
SELECT Add_Months(to_date('29-FEB-1999', 'DD-MON-YYYY'),12) FROM dual<br />
                          *<br />
ERROR at line 1:<br />
ORA-01839: date not valid for month specified</p>
<p>SQL&gt;<br />
</code><br />
Cheers, APC</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ying</title>
		<link>http://www.lifeaftercoffee.com/2006/11/27/sql-date-math-and-the-leap-year/comment-page-1/#comment-13113</link>
		<dc:creator>Ying</dc:creator>
		<pubDate>Tue, 28 Nov 2006 03:08:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.lifeaftercoffee.com/2006/11/27/sql-date-math-and-the-leap-year/#comment-13113</guid>
		<description>I discuss with my fren yesterday and come out a solution. Hope this will help.

SELECT Add_Months(trunc(sysdate),12) FROM dual;</description>
		<content:encoded><![CDATA[<p>I discuss with my fren yesterday and come out a solution. Hope this will help.</p>
<p>SELECT Add_Months(trunc(sysdate),12) FROM dual;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

