Exforsys
+ Reply to Thread
Results 1 to 6 of 6

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 ...

  1. #1
    parasuram is offline Junior Member Array
    Join Date
    Jul 2006
    Answers
    3

    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.


  2. #2
    zsk_00 is offline Member Array
    Join Date
    May 2006
    Answers
    38
    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


  3. #3
    parasuram is offline Junior Member Array
    Join Date
    Jul 2006
    Answers
    3

    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.


  4. #4
    zsk_00 is offline Member Array
    Join Date
    May 2006
    Answers
    38
    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


  5. #5
    pmk123 is offline Junior Member Array
    Join Date
    May 2007
    Answers
    1
    Quote Originally Posted by parasuram View Post
    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.


    Use the function to_date()


  6. #6
    zsk_00 is offline Member Array
    Join Date
    May 2006
    Answers
    38
    pmk123, the function to_date() converts a character string to a date datatype.


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...