Home » SQL & PL/SQL » SQL & PL/SQL » Convert a numeric value to INTERVAL YEAR in Oracle8i Enterprise Edition Release 8.
icon4.gif  Convert a numeric value to INTERVAL YEAR in Oracle8i Enterprise Edition Release 8. [message #215138] Fri, 19 January 2007 07:49 Go to next message
artsx
Messages: 21
Registered: June 2005
Location: Armenia
Junior Member

hi
I've the following table:

SQL> desc SCRCARD;

Name Type
----------------------------------------- -------- ---------
REFILLD NUMBER(18)
RI NUMBER(18)

I want to get the REFILLD as a humar readable date, like dd/mm/yyyy hh24:mi:ss.

I want to have something like this:

select to_char(REFILLD, 'dd.mm.yyyy. hh24:mi:ss')from SCRCARD where RI=0000618125;

Could someone help me on this issue?

thank you

[Updated on: Fri, 19 January 2007 07:52]

Report message to a moderator

Re: Convert a numeric value to INTERVAL YEAR in Oracle8i Enterprise Edition Release 8. [message #215141 is a reply to message #215138] Fri, 19 January 2007 07:53 Go to previous messageGo to next message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
You will have to first turn it into a DATE using a TO_DATE, but from the value you gave, I don't see how that is going to work.
Re: Convert a numeric value to INTERVAL YEAR in Oracle8i Enterprise Edition Release 8. [message #215144 is a reply to message #215141] Fri, 19 January 2007 08:00 Go to previous messageGo to next message
artsx
Messages: 21
Registered: June 2005
Location: Armenia
Junior Member

Thank you for your concerns.
Could you please tell me any possible way to do it?
Re: Convert a numeric value to INTERVAL YEAR in Oracle8i Enterprise Edition Release 8. [message #215151 is a reply to message #215138] Fri, 19 January 2007 08:19 Go to previous messageGo to next message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

Uhhmm

An example of the values in REFILLD perhaps ?
Re: Convert a numeric value to INTERVAL YEAR in Oracle8i Enterprise Edition Release 8. [message #215185 is a reply to message #215151] Fri, 19 January 2007 10:09 Go to previous message
artsx
Messages: 21
Registered: June 2005
Location: Armenia
Junior Member

hi tahpush,

thank you for your effort,

I did it:)

select to_date('01/01/1970', 'DD/MM/YYYY') + REFILLD / 86400 from dual;

A possible value of REFILLD is "1125072267".

Hope to again meet you here Smile
Previous Topic: Disable Trigger via DB Link
Next Topic: Retrieving the 2 most recent records from a table by date
Goto Forum:
  


Current Time: Sun Dec 04 20:30:30 CST 2016

Total time taken to generate the page: 0.05603 seconds