<?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: UNIX timestamp to Oracle Date Conversion</title>
	<atom:link href="http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/</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: Mike</title>
		<link>http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/comment-page-1/#comment-377051</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Tue, 14 Dec 2010 07:23:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/#comment-377051</guid>
		<description>There are a lot of these out there, but this is a really good &lt;a href=&quot;http://www.unixstamp.com&quot; rel=&quot;nofollow&quot;&gt;unix timestamp conversion utility&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>There are a lot of these out there, but this is a really good <a href="http://www.unixstamp.com" rel="nofollow">unix timestamp conversion utility</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shafi</title>
		<link>http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/comment-page-1/#comment-375629</link>
		<dc:creator>shafi</dc:creator>
		<pubDate>Thu, 15 Apr 2010 10:15:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/#comment-375629</guid>
		<description>Hi,

I need to select timestamp from one of DB tables,but it is in unix tistamp format.How can i convert unix timestamp to normal dd/mm/yyyy and select the data in oracle.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I need to select timestamp from one of DB tables,but it is in unix tistamp format.How can i convert unix timestamp to normal dd/mm/yyyy and select the data in oracle.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hedgehog</title>
		<link>http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/comment-page-1/#comment-369711</link>
		<dc:creator>Hedgehog</dc:creator>
		<pubDate>Tue, 05 Aug 2008 21:23:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/#comment-369711</guid>
		<description>What to do if my timestamps are bigger that 32-bit format e.g. 1026259200000 for date 2002-07-10 (yyyy-MM-dd)? If I cut last free 0 I&#039;m getting correct date. But how can be sure when to cut them and when not?</description>
		<content:encoded><![CDATA[<p>What to do if my timestamps are bigger that 32-bit format e.g. 1026259200000 for date 2002-07-10 (yyyy-MM-dd)? If I cut last free 0 I&#8217;m getting correct date. But how can be sure when to cut them and when not?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/comment-page-1/#comment-2222</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Sun, 25 Jun 2006 14:47:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/#comment-2222</guid>
		<description>Yup, Mike&#039;s query does the same thing my function does, just without error handling.  Nice for a one-off but if you need this often it&#039;s handy to have the function around.

Jon</description>
		<content:encoded><![CDATA[<p>Yup, Mike&#8217;s query does the same thing my function does, just without error handling.  Nice for a one-off but if you need this often it&#8217;s handy to have the function around.</p>
<p>Jon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/comment-page-1/#comment-2201</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Sat, 24 Jun 2006 16:45:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/#comment-2201</guid>
		<description>This query converts UNIX to Oracle and handles the time zones. Add TO_CHAR to format the date, if required. 

select trunc((timestamp &#039;1970-01-01 00:00:00 GMT&#039; + numtodsinterval(1094165422, &#039;SECOND&#039;)) at time zone &#039;Canada/Pacific&#039;) at_time_zone_date 
from dual</description>
		<content:encoded><![CDATA[<p>This query converts UNIX to Oracle and handles the time zones. Add TO_CHAR to format the date, if required. </p>
<p>select trunc((timestamp &#8217;1970-01-01 00:00:00 GMT&#8217; + numtodsinterval(1094165422, &#8216;SECOND&#8217;)) at time zone &#8216;Canada/Pacific&#8217;) at_time_zone_date<br />
from dual</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony Ettinger</title>
		<link>http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/comment-page-1/#comment-961</link>
		<dc:creator>Anthony Ettinger</dc:creator>
		<pubDate>Tue, 23 May 2006 21:07:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/#comment-961</guid>
		<description>you saved my day...i was ready to bang my head against the screeen.

#version 8.1.7x

oracle_date := unix_epoch + (unixts/86400);</description>
		<content:encoded><![CDATA[<p>you saved my day&#8230;i was ready to bang my head against the screeen.</p>
<p>#version 8.1.7x</p>
<p>oracle_date := unix_epoch + (unixts/86400);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Life After Coffee &#187; UNIX Time and UNIX Timestamps</title>
		<link>http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/comment-page-1/#comment-381</link>
		<dc:creator>Life After Coffee &#187; UNIX Time and UNIX Timestamps</dc:creator>
		<pubDate>Wed, 19 Apr 2006 01:23:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/#comment-381</guid>
		<description>[...] A recent comment on my story about converting UNIX timestamps to Oracle dates prompted me to do a little extra digging on UNIX time. [...]</description>
		<content:encoded><![CDATA[<p>[...] A recent comment on my story about converting UNIX timestamps to Oracle dates prompted me to do a little extra digging on UNIX time. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/comment-page-1/#comment-378</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Tue, 18 Apr 2006 13:47:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/#comment-378</guid>
		<description>Srivalli,

I believe the discrepency you are seing is because the UNIX timestamp is reported in Coordinated Universal Time (UTC).  UTC is equivalent to Greenwich Mean Time (GMT).  To evaluate the date in your local timezone you will need to convert it with the Oracle delivered new_time function as below:

select to_char(new_time(unixts_to_date(1145366808), &#039;GMT&#039;, &#039;EDT&#039;), &#039;MM/DD/YYYY HH24:MI:SS&#039;) from dual

If you grab a UNIX timestamp from a converter on a website be careful, some of them are converting for their own timezone already.  This one allows you to enter an offset from GMT for accurate timestamps:

&lt;a href=&quot;http://www.4webhelp.net/us/timestamp.php&quot; rel=&quot;nofollow&quot;&gt;http://www.4webhelp.net/us/timestamp.php&lt;/a&gt;

Hope this helps.  Perhaps I&#039;ll rewrite this function to compensate for the timezone as well.

Jon</description>
		<content:encoded><![CDATA[<p>Srivalli,</p>
<p>I believe the discrepency you are seing is because the UNIX timestamp is reported in Coordinated Universal Time (UTC).  UTC is equivalent to Greenwich Mean Time (GMT).  To evaluate the date in your local timezone you will need to convert it with the Oracle delivered new_time function as below:</p>
<p>select to_char(new_time(unixts_to_date(1145366808), &#8216;GMT&#8217;, &#8216;EDT&#8217;), &#8216;MM/DD/YYYY HH24:MI:SS&#8217;) from dual</p>
<p>If you grab a UNIX timestamp from a converter on a website be careful, some of them are converting for their own timezone already.  This one allows you to enter an offset from GMT for accurate timestamps:</p>
<p><a href="http://www.4webhelp.net/us/timestamp.php" rel="nofollow">http://www.4webhelp.net/us/timestamp.php</a></p>
<p>Hope this helps.  Perhaps I&#8217;ll rewrite this function to compensate for the timezone as well.</p>
<p>Jon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: srivalli</title>
		<link>http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/comment-page-1/#comment-375</link>
		<dc:creator>srivalli</dc:creator>
		<pubDate>Tue, 18 Apr 2006 04:33:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/#comment-375</guid>
		<description>I thought it will solve the problem , but its not.
    I implemented the same procedure what ever is given above  for converting from timestamp to  date  and time . It is giveing the correct date but not the time , as my sytem is showing it differently</description>
		<content:encoded><![CDATA[<p>I thought it will solve the problem , but its not.<br />
    I implemented the same procedure what ever is given above  for converting from timestamp to  date  and time . It is giveing the correct date but not the time , as my sytem is showing it differently</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/comment-page-1/#comment-299</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Thu, 06 Apr 2006 12:03:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.lifeaftercoffee.com/2005/10/20/unix-timestamp-to-oracle-date-conversion/#comment-299</guid>
		<description>That&#039;s a nice and succinct method Johannes.  The one above does essentially the same thing with a couple variables and a couple more steps, but also provides some exception handling.</description>
		<content:encoded><![CDATA[<p>That&#8217;s a nice and succinct method Johannes.  The one above does essentially the same thing with a couple variables and a couple more steps, but also provides some exception handling.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

