Link to home
Start Free TrialLog in
Avatar of edoc_admin
edoc_admin

asked on

Convert number to date in Oracle

Hello,
I have a table whose date fields are all declared as NUMBER. For example, the value 14076 is supposed to represent 16-Jul-2008. I'm not sure how this number was created - whether it was internally created by the system or it was converted using TO_DATE / TO_NUMBER functions. I'd like to convert this number to a date (i.e. from 14076 to 16-Jul-2008). Could you please help ?
The Oracle version I'm using is 9.2.0.8.

Your assistance is greatly appreciated.


ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of edoc_admin
edoc_admin

ASKER

Hi sdstuber,

It works. If you don't mind, could you please explain the logic of your SQL statement ?
1) Why Jan 1, 1970 particularly ?
2) And how was this N number calculated in the first place i.e. from 16 Jul 08 to 14076 ?

Thank you for your help.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial