0
votes

i'm trying to convert a string date from a flat file to a Date data type. what i did is create a new conv out port and use TO_Date ( Field name , 'YYYY/MM/DD') and i'm getting an error ..... this is the error message btw this the date i'm getting from the late file ....

" Severity Timestamp Node Thread Message Code Message ERROR 3/17/2014 4:18:01 PM node01_t41-ccc-03 TRANSF_1_1_1 TE_7007 Transformation Evaluation Error [<> [TO_DATE]: invalid string for converting to Date ... t:TO_DATE(s:' ',s:'YYYY/MM/DD HH:MI:SS')] " please help ....

Sam

1
It looks like a blank string was passed to the TO_DATE method: s:' ' Check your input data.Datajam
Datajam's right: the error message clearly indicates there was a blank space passed as input port. Try using IIF(IS_DATE(in_port), TO_DATE(in_port, 'YYYY/MM/DD'), '19000101') - or any other default date.Maciejg

1 Answers

1
votes

while extracting data from a flat file with NULL values, the SQ may sometimes take the length as 0 or 1, try to change the length of that specific column to 10(date length) and use IIF function to load NULL values.