Home » SQL & PL/SQL » SQL & PL/SQL » date format
date format [message #195760] Mon, 02 October 2006 04:04 Go to next message
navkrish
Messages: 189
Registered: May 2006
Location: NJ,USA
Senior Member

i am getting date as in this format

0991016
1040614
1020215
0991228



from a file...not sure whether it is in packed decimal...i need to load this value as date parameter into table...

Do anyone have any idea...

I too know that i haven’t given full information...but this what i have...

Naveen

[Updated on: Mon, 02 October 2006 04:05]

Report message to a moderator

Re: date format [message #195763 is a reply to message #195760] Mon, 02 October 2006 04:18 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Ummm, I think you've got a big problem.
If you don't have a format for the data, then there's no way you can convert it into a date.

Looking at the data, I can't see an obvious date in there.
You need to go back to whoever is giving you this data (or even to the documentation for it) and find out what format this information is in.
Re: date format [message #195777 is a reply to message #195763] Mon, 02 October 2006 06:18 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
could it be like this:

nnnmmdd where nnn is number of years since 1900?
Re: date format [message #195784 is a reply to message #195777] Mon, 02 October 2006 06:50 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Give that man a prize for pattern recognition!
Re: date format [message #195785 is a reply to message #195784] Mon, 02 October 2006 06:51 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Been working late in the Y2K days Cool
Re: date format [message #196237 is a reply to message #195760] Wed, 04 October 2006 10:31 Go to previous messageGo to next message
navkrish
Messages: 189
Registered: May 2006
Location: NJ,USA
Senior Member

yes Frank...your are right...
great chap:)

Naveen
Re: date format [message #196413 is a reply to message #195760] Thu, 05 October 2006 04:19 Go to previous message
navkrish
Messages: 189
Registered: May 2006
Location: NJ,USA
Senior Member

The format for the dates in flat file are:

Century - 1 pos.,
Year - 2 pos.,
Month - 2 pos.,
Day - 2 pos.

But the column in table is in date format.

is this right?


LOAD DATA
   INTO TABLE table_name
   (  
      data_1        POSITION(1:7) "to_date(:data_1+19000000, 'YYYYMMDD')"
   )



Naveen
Previous Topic: spell out a number
Next Topic: want to execute some DML stement from Developer
Goto Forum:
  


Current Time: Fri Dec 09 09:38:59 CST 2016

Total time taken to generate the page: 0.23488 seconds