Solved

convert unix time stamp to oracle date format

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
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 explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

705 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now