
- Forum
- ERP
- Data Warehousing
- about Informatica
about Informatica
This is a discussion on about Informatica within the Data Warehousing forums, part of the ERP category; hai, i want know the date conversion method in Informatica thatis, In transactional database date is stored in day wise ...
-
about Informatica
hai,
i want know the date conversion method in Informatica thatis, In transactional database date is stored in day wise but i want to convert that into months, months converted into quarters and years. please tell me the answer.
-
if dt = day in the transactional table,
try the following in a expression transformation
v_month = GET_DATE_PART(dt, 'MM') ' will return month
v_quarter =
decode (true,
v_month >=1 and v_month<=3, 1,
v_month >=4 and v_month<=6, 2,
v_month >=7 and v_month<=9, 3,
v_month >=10 and v_month<=12, 4
)
v_year = GET_DATE_PART(dt, 'YYYY') ' will return month
Note: left side of the assignment statement is the port name and right side is what goes in the expression.
define all of these as variable and once you have the values, create output ports to get these values e.g
o_month = v_month
o_quarter=v_quarter
o_year = v_year
If you need fiscal year (which can be different that calendar year), use the similar logic as for getting quarter.
Hope it helps (if not let me know
Zafar
-
about Informatica
thanks Zafer for replay, but actually i want the conversion in INFORMATICA, in Informatica tool there is any transformation technique required for that.
-
the code is for Informatica, as the post says, you put this in Expression Transformation in your mapping. Also, look for help on GET_DATE_PART and DECODE in help and you will find some examples.
zafar
-
-
pmk123, the function to_date() converts a character string to a date datatype.
-
Sponsored Ads

Reply With Quote






