Solved

convert unix time stamp to oracle date format

Posted on 2006-06-28
5
16,079 Views
Last Modified: 2013-12-12
is it possible convert a unix time stamp 1151530818 into oracle date format  jan-22-1987  
0
Comment
Question by:sweetysmile
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 14

Expert Comment

by:sathyagiri
ID: 17005688
Try this

select to_date('01-JAN-1970 00:00:00, 'DD-MON-YYYY HH:MI:SS') + NUMTODSINTERVAL(1151530818,'SECOND') from dual;
0
 

Author Comment

by:sweetysmile
ID: 17005743
hey its giving an error

hour must be between 1 and 12
0
 
LVL 14

Accepted Solution

by:
sathyagiri earned 250 total points
ID: 17005760


Change it to
 

select to_date('01-JAN-1970 00:00:00, 'DD-MON-YYYY HH24:MI:SS') + NUMTODSINTERVAL(1151530818,'SECOND') from dual;
 
0
 

Author Comment

by:sweetysmile
ID: 17005779
hey thanks a lot it worked
0
 
LVL 14

Expert Comment

by:sathyagiri
ID: 17005790
Missed a quote again sorry
select to_date('01-JAN-1970 00:00:00', 'DD-MON-YYYY HH24:MI:SS') + NUMTODSINTERVAL(1151530818,'SECOND') from dual;
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question