Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Date conversion question

Re: Date conversion question

From: Gints Plivna <gints.plivna_at_gmail.com>
Date: Thu, 4 Oct 2007 11:11:32 +0300
Message-ID: <6e49b6d00710040111t15d4e198oc33416a5637a7838@mail.gmail.com>


I'd say that there are two parts in this task: 1) Requirements/logical part.
Understand how to convert these in the first sight at least for me unclear numbers into dates and write it down in a more or less formal way without thinking whether it will or won't be Oracle, PL/SQL or whatever. I.e. how to get year, how to get month, how to get day. As others have pointed out there are at least some suspected cases.

2) Technical part.
Load your data into staging table and write some sql statement(-s) or pls/sql procedure (if the algorithm is too complicated) to convert these numbers to oracle dates.

Such process will help you once again understand and think about conversion algorithm (abstracting from the exact implementation details) and also you can show it to somebody that can approve it :)

Gints Plivna
http://www.gplivna.eu

2007/10/3, Harvinder Singh <Harvinder.Singh_at_metratech.com>:
> Hi,
>
> We have a flat file that contains a column and the values are stored as:
> 991123
> 421
> 60823
> 0
> 70930
>
> Now we are moving data from flat file to table and this column will be
> inserted into Date dataype column, What is the way to insert into this
> table and avoid "ORA-01821: date format not recognized" errors.
>
> Thanks
> --Harvinder
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Oct 04 2007 - 03:11:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US