Page 1 of 1

db2 timestamp to oracle timestamp

Posted: Tue Mar 29, 2005 2:40 pm
by alvarez-m
Hi All,

I am having problems moving timestamp data from DB2 to Oracle.

For Instance, a typical db2 timestamp value is 2004-03-31-15.01.37.840804

I can not load that value in an oracle timestamp(6), I get a conversion error. Interestingly, I am able to load the value up to the seconds
with zeroes for milliseconds: 2004-03-31-15.01.37.000000. However, I would like to bring the milliseconds too.

Max.

Posted: Tue Mar 29, 2005 4:22 pm
by chucksmith
Try reformatting your date to the following before passing it to Oracle:

2004-03-31 15:01:37.840

Posted: Tue Mar 29, 2005 4:58 pm
by roy
Hi,
Check with your DBAs for the exact precision the date column have (it might not had miliseconds)
and transform the input date accordingly.

IHTH,

Posted: Wed Mar 30, 2005 11:12 am
by gpatton
Define the timestamp for DB2 as Varchar(26) when you read it from DB2.

Posted: Sat Apr 02, 2005 5:51 pm
by diamondabhi
use Oconv(link.columnname"D D-M-Y,[,A3,2]")