Page 1 of 1

Issue handling date datatype with APT_STRING_PADCHAR

Posted: Wed Feb 20, 2013 6:20 pm
by suja.somu
I am creating a fixed flat file, I have around 10 columns with one date column in it. I have declared all column as CHAR in fixed flat file.

I do a date conversion from MM/DD/YYYY to YYYY-MM-DD format using stage variables for this field. I was getting expected results and was working fine.



Functions that are used in stage variables to convert date to required format :

BIRTH_DATE ['/',1,1] and DateFromComponents(Yr, MthPad, DtPad)


For char fields, the target was paddding NULLS, so to handle this I used the APT_STRING_PADCHAR to make it space(0x20).

The date conversion was not working properly and populating ********* ( stars) in the file.
Can anyone help to me find , where is the problem and how to fix this issue?

Posted: Wed Feb 20, 2013 7:37 pm
by ray.wurlod
APT_STRING_PADCHAR does not affect Date data type. You need to find better specifications for extracting the date from your source, perhaps using StringToDate() and DateToString() functions. Review documentation and/or Search DSXchange for how to specify variable formats such as one- or two-digit month.