Illegal date/time value

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
poorna_76
Charter Member
Charter Member
Posts: 190
Joined: Thu Jul 08, 2004 10:42 am

Illegal date/time value

Post by poorna_76 »

Hi,
I am trying to insert date values into db2 table which is defined as date(10).

I tried using both ODBC & DB2UDB stage.


When i use ODBC stage, iam getting the following error:

Illegal date/time value DATE1 = '01/01/2004'


When i use DB2UDB stage, iam getting the following error:

"Value treated as NULL
Attempt to convert String value "01/01/2004" to Date type unsuccessful
"


I am using folowing code to convert into db2 format:

OCONV(ICONV(linkname.DATE1,"DMDY"),"D4/MDY[2,2,4]")

Please help me out.
davidnemirovsky
Participant
Posts: 85
Joined: Fri Jun 04, 2004 2:30 am
Location: Melbourne, Australia
Contact:

Post by davidnemirovsky »

Perhaps try using the DB2 native format: YYYY-MM-DD-HH.MI.SS.FFFFFF

Would look something like:
OCONV(ICONV(linkname.DATE1,"DMDY"),"D-YMD[4,4,2]") : "-00.00.00.000000"
Cheers,
Dave Nemirovsky
Post Reply