Home » SQL & PL/SQL » SQL & PL/SQL » How to convert a number to date?
How to convert a number to date? [message #36092] Mon, 05 November 2001 01:25 Go to next message
Nicola Farina
Messages: 63
Registered: October 2001
Member
Hi all,

I am doing a little "reverse-engineering" of a Oracle table.
I know that in a field of this table it is stored a date-time pair, but the field is a number type. The values are of this kind:
36664,4276851852
36669,6295717604 and so on..
Is there any chance, in your opinion, that this format would be the same used internally by Oracle for DATE columns?
Which is the best/quick way to convert this value in a date via SQL?
I tried
select ...TO_DATE(FieldNumber) but obviously this doesn't work..
Thanks in advance for any help!
Nicola

----------------------------------------------------------------------
Re: How to convert a number to date? [message #36093 is a reply to message #36092] Mon, 05 November 2001 01:30 Go to previous message
homer
Messages: 17
Registered: October 2001
Junior Member
to_date(number,format)
e.g:
to_date(20011105,YYYY/MM/DD)
I believe but not sure.
Try it

----------------------------------------------------------------------
Previous Topic: Define or Accept
Next Topic: Re: How to convert a number to date?
Goto Forum:
  


Current Time: Fri Apr 19 12:54:02 CDT 2024