1

Using Datastage 11.5.0.2, Jobs failed when it try to load the data as "0" into DATE FIELD (DB2)..

In source DB, the column is VARCHAR whereas in target it is DATE field.. the only value in source which failed to load is 0. how to resolve.. any idea pl

Vignesh
  • 375
  • 1
  • 2
  • 13

3 Answers3

1

Create one stage variable: if (input column value ) = 0 then use StringToDate("0001-01-01", "%dd:%mm:%yyyy") Else StringToDate(inputcolumn, "%dd:%mm:%yyyy")

0

You can use the in the transformer stage,

StringToTimestamp(Column,"%yyyy-%mm-%dd")

also you can convert data in Source qualifier by using below in select query

   to_date(column,"%yyyy-%mm-%dd")
Sukriti Singh
  • 43
  • 1
  • 2
  • 13
0

Can use the to_date function

to_date(column,'YYYY-MM-DD')
TO_DATE(column, 'YYYY-MM-DD HH24:MI:SS')
jpn
  • 43
  • 9