<?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: Oracle Trunc Function</title>
	<atom:link href="http://www.ilearnttoday.com/oracle-trunc-function/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ilearnttoday.com/oracle-trunc-function</link>
	<description>This is where I share what I learn day by day...</description>
	<lastBuildDate>Fri, 18 May 2012 13:39:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Menol</title>
		<link>http://www.ilearnttoday.com/oracle-trunc-function#comment-4269</link>
		<dc:creator>Menol</dc:creator>
		<pubDate>Mon, 23 Apr 2012 11:43:40 +0000</pubDate>
		<guid isPermaLink="false">http://ilearnttoday.wordpress.com/?p=24#comment-4269</guid>
		<description>Hi Abhinav,

The results you get may be the same but the process isn&#039;t.

When you don&#039;t specify the formatting string, then the formatter will use current culture settings it can find in the database server. These settings can easily be changed by an admin for different purposes.

If current culture settings in the server are same to what you want then you are fine as long as those culture settings remain same. When someone changes those settings then the result you get will not be the same.

On the other hand, when you specify the format you can rest assured that the output will be exactly what you want regardless of any cultural changes to the server.

Thanks.
Menol</description>
		<content:encoded><![CDATA[<p>Hi Abhinav,</p>
<p>The results you get may be the same but the process isn&#8217;t.</p>
<p>When you don&#8217;t specify the formatting string, then the formatter will use current culture settings it can find in the database server. These settings can easily be changed by an admin for different purposes.</p>
<p>If current culture settings in the server are same to what you want then you are fine as long as those culture settings remain same. When someone changes those settings then the result you get will not be the same.</p>
<p>On the other hand, when you specify the format you can rest assured that the output will be exactly what you want regardless of any cultural changes to the server.</p>
<p>Thanks.</p>
<p>Menol</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abhinav Dixit</title>
		<link>http://www.ilearnttoday.com/oracle-trunc-function#comment-4214</link>
		<dc:creator>Abhinav Dixit</dc:creator>
		<pubDate>Tue, 13 Mar 2012 10:25:43 +0000</pubDate>
		<guid isPermaLink="false">http://ilearnttoday.wordpress.com/?p=24#comment-4214</guid>
		<description>Hi Menol,

So, trunc(to_date(’22-AUG-03′), ‘DDD’)
 and 
trunc(to_date(’22-AUG-03′)).
Are they not same?

SELECT TRUNC (TO_DATE (&#039;22-AUG-03&#039;)) WITH_DDD, TRUNC (TO_DATE (&#039;22-AUG-03&#039;), &#039;DDD&#039;) WITHOUT_DDD
  FROM DUAL;

Thank You,
Abhinav Dixit</description>
		<content:encoded><![CDATA[<p>Hi Menol,</p>
<p>So, trunc(to_date(’22-AUG-03′), ‘DDD’)<br />
 and<br />
trunc(to_date(’22-AUG-03′)).<br />
Are they not same?</p>
<p>SELECT TRUNC (TO_DATE (&#8217;22-AUG-03&#8242;)) WITH_DDD, TRUNC (TO_DATE (&#8217;22-AUG-03&#8242;), &#8216;DDD&#8217;) WITHOUT_DDD<br />
  FROM DUAL;</p>
<p>Thank You,<br />
Abhinav Dixit</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Menol</title>
		<link>http://www.ilearnttoday.com/oracle-trunc-function#comment-4171</link>
		<dc:creator>Menol</dc:creator>
		<pubDate>Thu, 16 Feb 2012 09:15:47 +0000</pubDate>
		<guid isPermaLink="false">http://ilearnttoday.wordpress.com/?p=24#comment-4171</guid>
		<description>Hi Alavian,

Thanks for your kind feedback. Appriciate it.

DDD would format the exact date you provided 
e.g.
trunc(to_date(’22-AUG-03′), ‘DDD’)  
would return ’22-AUG-03′
This is the exact day only formatted the way you specified.

On the other hand, DAY would return the FIRST DAY of that particular week. 

e.g.
When you use following command,
trunc(to_date(’22-AUG-03′), ‘DAY’)

Then Oracle would look at the calender to see the week this day (22/08/2003) belongs to and will return the starting day of that week (which is 17th).

So it would return ’17-AUG-03′

I hope this is clear enough. 

Wish you great future...</description>
		<content:encoded><![CDATA[<p>Hi Alavian,</p>
<p>Thanks for your kind feedback. Appriciate it.</p>
<p>DDD would format the exact date you provided<br />
e.g.<br />
trunc(to_date(’22-AUG-03′), ‘DDD’)<br />
would return ’22-AUG-03′<br />
This is the exact day only formatted the way you specified.</p>
<p>On the other hand, DAY would return the FIRST DAY of that particular week. </p>
<p>e.g.<br />
When you use following command,<br />
trunc(to_date(’22-AUG-03′), ‘DAY’)</p>
<p>Then Oracle would look at the calender to see the week this day (22/08/2003) belongs to and will return the starting day of that week (which is 17th).</p>
<p>So it would return ’17-AUG-03′</p>
<p>I hope this is clear enough. </p>
<p>Wish you great future&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sia Alavian</title>
		<link>http://www.ilearnttoday.com/oracle-trunc-function#comment-4170</link>
		<dc:creator>Sia Alavian</dc:creator>
		<pubDate>Thu, 16 Feb 2012 06:17:47 +0000</pubDate>
		<guid isPermaLink="false">http://ilearnttoday.wordpress.com/?p=24#comment-4170</guid>
		<description>great post, great blog! 

you really explained it very well :-)
I just didn&#039;t got in example &#039;DAY&#039; returns 17-AUG-03? what&#039;s the difference between DAY and DDD</description>
		<content:encoded><![CDATA[<p>great post, great blog! </p>
<p>you really explained it very well <img src='http://www.ilearnttoday.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
I just didn&#8217;t got in example &#8216;DAY&#8217; returns 17-AUG-03? what&#8217;s the difference between DAY and DDD</p>
]]></content:encoded>
	</item>
</channel>
</rss>

