aswathy
aswathy

Reputation: 831

Informatica datatype conversion

wanted to have two columns separate in target table

How can I populate in Expression Transformation? What is the expression used? Please guys, help me out.

I used

Upvotes: 0

Views: 238

Answers (1)

Utsav
Utsav

Reputation: 8103

If your in_column type is already date/time then what you are using right now is almost correct, except use HH24MISS instead of HHMISS. Or use HH12MISS AM.

  • TO_CHAR(in_column, 'YYYYMMDD') for CTDATE
  • TO_CHAR(in_column, 'HH24MISS') for CTTIME

If in_column is a string, the first convert it to a date/time. Suppose in_column is coming as 'Jan 24 2017 14:24:56' then

  • first create a variable v_in_column as TO_DATE( in_column, 'MON DD YYYY HH24:MI:SS' )
  • Then use this variable to derive CTDATE and CTTIME
    • TO_CHAR(v_in_column, 'YYYYMMDD') for CTDATE
    • TO_CHAR(v_in_column, 'HHMISS') for CTTIME

Upvotes: 1

Related Questions