Link to home
Start Free TrialLog in
Avatar of smalig
smalig

asked on

oracle sql

Hello experts,
I need to insert a value that is from a to_date function to a timestamp column

ex: i have this select statement -- select TO_DATE(substr(M."LASTUPDATETIME",1,19),'YYYY-MM-DD HH24:MI:SS') from a

I need to insert this value to a timestamp(0) column.

the output from the select is --  2015-06-30 05:21:55

and when I insert it to the timestamp column it becomes --  0030-06-15 00:00:00


how can I fix this?
thanks for your help.
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I agree that this is most likely caused by an implicit datatype conversion, or an incorrect format mask somewhere if you use explicit datatype conversions.

What do these queries return in your system?

select sysdate from dual;

select systimestamp from dual;