<?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: ORA-1810 and Other Dating Disasters</title>
	<atom:link href="http://mikesmithers.wordpress.com/2011/02/22/ora-1810-and-other-dating-disasters/feed/" rel="self" type="application/rss+xml" />
	<link>http://mikesmithers.wordpress.com/2011/02/22/ora-1810-and-other-dating-disasters/</link>
	<description>Oracle - for when it was like that when you got there</description>
	<lastBuildDate>Sat, 15 Jun 2013 15:04:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: mikesmithers</title>
		<link>http://mikesmithers.wordpress.com/2011/02/22/ora-1810-and-other-dating-disasters/#comment-2264</link>
		<dc:creator><![CDATA[mikesmithers]]></dc:creator>
		<pubDate>Sun, 06 Mar 2011 11:43:34 +0000</pubDate>
		<guid isPermaLink="false">http://mikesmithers.wordpress.com/?p=841#comment-2264</guid>
		<description><![CDATA[Glen,

Really useful comment.

Extract is a new one on me :
[sourcecode language=&quot;sql&quot;]
select extract( year from sysdate) from dual;
[/sourcecode]

As for add_months...

[sourcecode language=&quot;sql&quot;]
select months_between(&#039;31-DEC-11&#039;, &#039;28-FEB-11&#039;) from dual;
select ROUND(months_between(&#039;31-DEC-11&#039;, &#039;06-MAR-11&#039;)) from dual;
select FLOOR(months_between(&#039;31-DEC-11&#039;, &#039;06-MAR-11&#039;)) from dual;
[/sourcecode]

Really good stuff.

Thanks for sharing,

Mike]]></description>
		<content:encoded><![CDATA[<p>Glen,</p>
<p>Really useful comment.</p>
<p>Extract is a new one on me :</p>
<pre class="brush: sql; title: ; notranslate">
select extract( year from sysdate) from dual;
</pre>
<p>As for add_months&#8230;</p>
<pre class="brush: sql; title: ; notranslate">
select months_between('31-DEC-11', '28-FEB-11') from dual;
select ROUND(months_between('31-DEC-11', '06-MAR-11')) from dual;
select FLOOR(months_between('31-DEC-11', '06-MAR-11')) from dual;
</pre>
<p>Really good stuff.</p>
<p>Thanks for sharing,</p>
<p>Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: glenm</title>
		<link>http://mikesmithers.wordpress.com/2011/02/22/ora-1810-and-other-dating-disasters/#comment-2234</link>
		<dc:creator><![CDATA[glenm]]></dc:creator>
		<pubDate>Wed, 02 Mar 2011 03:09:22 +0000</pubDate>
		<guid isPermaLink="false">http://mikesmithers.wordpress.com/?p=841#comment-2234</guid>
		<description><![CDATA[extract(year from sysdate) will extract the year number from the date

trunc(sysdate,&#039;yyyy&#039;) will return the start of the year (1st Jan).

round(sysdate,&#039;yyyy&#039;) will return the start of the year (1st jan) closest to the current date. This means july-2010 becomes 1/jan/2011, while june-2010 becomes 1/jan/2010. This is really helpful for Australian financial years (which run 1-july to 30-june) because extract(year from round(sysdate,&#039;yyyy&#039;)) will give you the financial year number for the date.

Also don&#039;t forget the months_between function. Handy for calculating a person age (divide result by 12).]]></description>
		<content:encoded><![CDATA[<p>extract(year from sysdate) will extract the year number from the date</p>
<p>trunc(sysdate,&#8217;yyyy&#8217;) will return the start of the year (1st Jan).</p>
<p>round(sysdate,&#8217;yyyy&#8217;) will return the start of the year (1st jan) closest to the current date. This means july-2010 becomes 1/jan/2011, while june-2010 becomes 1/jan/2010. This is really helpful for Australian financial years (which run 1-july to 30-june) because extract(year from round(sysdate,&#8217;yyyy&#8217;)) will give you the financial year number for the date.</p>
<p>Also don&#8217;t forget the months_between function. Handy for calculating a person age (divide result by 12).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mikesmithers</title>
		<link>http://mikesmithers.wordpress.com/2011/02/22/ora-1810-and-other-dating-disasters/#comment-2188</link>
		<dc:creator><![CDATA[mikesmithers]]></dc:creator>
		<pubDate>Wed, 23 Feb 2011 21:00:40 +0000</pubDate>
		<guid isPermaLink="false">http://mikesmithers.wordpress.com/?p=841#comment-2188</guid>
		<description><![CDATA[Gary,

thanks, I like that much better - less typing...which is always a consideration first thing in the morning pre-coffee.

Mike]]></description>
		<content:encoded><![CDATA[<p>Gary,</p>
<p>thanks, I like that much better &#8211; less typing&#8230;which is always a consideration first thing in the morning pre-coffee.</p>
<p>Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://mikesmithers.wordpress.com/2011/02/22/ora-1810-and-other-dating-disasters/#comment-2186</link>
		<dc:creator><![CDATA[Gary]]></dc:creator>
		<pubDate>Wed, 23 Feb 2011 08:29:11 +0000</pubDate>
		<guid isPermaLink="false">http://mikesmithers.wordpress.com/?p=841#comment-2186</guid>
		<description><![CDATA[While there isn&#039;t a FIRST_DAY, you can do TRUNC(sysdate,&#039;MM&#039;) to get the start of the month.]]></description>
		<content:encoded><![CDATA[<p>While there isn&#8217;t a FIRST_DAY, you can do TRUNC(sysdate,&#8217;MM&#8217;) to get the start of the month.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
