Solved

convert unix time stamp to oracle date format

Posted on 2006-06-28
5
16,073 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
  • 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
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.

791 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