to_timestamp_tz [message #681856] |
Fri, 04 September 2020 08:42 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
pstanand
Messages: 133 Registered: February 2005 Location: Chennai,India
|
Senior Member |
|
|
Hi I have a table with column created with TIMESTAMP(6) WITH TIME ZONE as data type.
I got the data in the csv file for this column as 6/18/2020 10:48:25.000000 PM -06:00.
However when I tried to import data through sql developer I got
ORA-01843: not a valid month.
Could you please help me here to get the data inserted into my table.
Appreciate your help.
Thanks.
create table prod_cat(prod_id number,created timestamp(6) with time zone.
|
|
|
Re: to_timestamp_tz [message #681857 is a reply to message #681856] |
Fri, 04 September 2020 09:35 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
John Watson
Messages: 8944 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
orclz>
orclz> select to_timestamp_tz('6/18/2020 10:48:25.000000 PM -06:00') from dual;
select to_timestamp_tz('6/18/2020 10:48:25.000000 PM -06:00') from dual
*
ERROR at line 1:
ORA-01843: not a valid month
orclz>
orclz> alter session set nls_timestamp_tz_format='MM/DD/YYYY HH:MI:SS.FF AM TZH:TZM';
Session altered.
orclz>
orclz> select to_timestamp_tz('6/18/2020 10:48:25.000000 PM -06:00') from dual;
TO_TIMESTAMP_TZ('6/18/202010:48:25.000000PM-06:00')
---------------------------------------------------------------------------
06/18/2020 10:48:25.000000000 PM -06:00
orclz>
|
|
|
|
|
|