Date Formatting in Informatica

Get new comments by email
You can cancel email alerts at anytime.
Comments (3)

Rahim Macknojia in Houston, Texas

89 months ago

I am trying to do the following in the Expression Transformation but the results are surprising.

GET_DATE_PART(Conversion_date,"MM") - This gives me 1,2,3... as expected
GET_DATE_PART(Conversion_date,"MON") - This gives me 1,2,3... Expecting JAN,FEB etc
GET_DATE_PART(Conversion_date,"MONTH") - This also gives me 1,2,3... Expecting JANUARY, FEBRUARY etc

Does anyone know if there is a bug on this function? We are using Informatica version 7

- Was this comment helpful? Yes (8) / No Reply - Report abuse

Raj in Columbus, Ohio

84 months ago

Try using single quotes instead of double codes

- Was this comment helpful? Yes / No Reply - Report abuse

priya in Hackensack, New Jersey

83 months ago

Rahim Macknojia in Houston, Texas said: I am trying to do the following in the Expression Transformation but the results are surprising.

GET_DATE_PART(Conversion_date,"MM") - This gives me 1,2,3... as expected
GET_DATE_PART(Conversion_date,"MON") - This gives me 1,2,3... Expecting JAN,FEB etc
GET_DATE_PART(Conversion_date,"MONTH") - This also gives me 1,2,3... Expecting JANUARY, FEBRUARY etc

Does anyone know if there is a bug on this function? We are using Informatica version 7

GET_DATE_PART
Returns the specified part of a date as an integer value. Therefore, if you create an expression
that returns the month portion of the date, and pass a date such as Apr 1 1997 00:00:00,
GET_DATE_PART returns 4.

Syntax
GET_DATE_PART( date, format )
Return Value
Integer representing the specified part of the date.
NULL if a value passed to the function is NULL.

- Was this comment helpful? Yes / No Reply - Report abuse

» Sign in or create an account to comment on this topic.