Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert Char to Date with many different date formats
Message
De
24/03/2000 05:50:26
 
 
À
Tous
Information générale
Forum:
Oracle
Catégorie:
Autre
Titre:
Convert Char to Date with many different date formats
Divers
Thread ID:
00349901
Message ID:
00349901
Vues:
49
Hi!
I need to import a character column to a date column
but the dates or in many different formats:
Quite difficult because there are many different types of date formats:

I don't think it can be done but maybe some one has a way..

Example:

01 Aug
01 Sep
03 July
1-Aug-2000
1-Jul-2000
1-Oct-2000
1-Sep-2000
1-Sept-2000
1/2-00
1/3-00
1/3-00 w9
10-Sep-2001
10/4-00
12-Nov-2000
12/6-00
14-Aug-2000
15 Aug
15 August 2000
15 Sep

I know the code should look something like:
For 15 Sep
update styles
set mod003=to_date(moc029,'dd MON');

For
15 August 2000
set mod003=to_date(moc029,'dd month yyyy');

But the problem is all will give the message
*
ERROR at line 2:
ORA-01843: not a valid month

Because this expects that all columns have the same date format.

Is there some way I can only get the dates with the format
without the error message and maybe create
1 update statement for each column...

Thanks!!!!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform