• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Oracle 6 digit date ?

 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I came accross a date format defined as number(6,0) used in a JD Edwards database.

A number such as 104147 is apparently year 2004, 147th year...

Does Oracle 8i have a function that can convert this to date type ?

thanks in advance,

J.C
 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, you would have to write your own.

By the way, do you not mean 104147 is year 2004, 147th day?

If so, you would do something like

TO_DATE(TO_CHAR(1900000+v_jd_date),'YYYYDDD')

where v_jd_date is your JD Edwards date-as-a-number

[ November 11, 2006: Message edited by: Chris Hendy ]
[ November 11, 2006: Message edited by: Chris Hendy ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic