Skip to Content

Mapping conversion error in Dates

Hello Experts,

I am doing date conversion in Message Mapping from ECC date will come in YYYYMMDD for target i need to convert to YYYY_MM_DD for this i am using date transfer function.Issue is when date is coming like 20110908 it is converting properly like 2011-09-08

But when from ECC date is coming like 00000000 then by default it converting to 0002-11-30 how this date is coming i am not understanding actually it should convert like 0000-00-00 .

Please help me

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Dec 13, 2011 at 11:43 AM

    Hi,

    I am not quite sure why the conversion works like that. That said, the date 0000-00-00 is not a valid date, as that date has never existed. That may be the reason for the strange behaviour by PI.

    I suggest you add fixed-values conversion before your dateConvert step in the mapping. Here you check for date 00000000 and map it to e.g. 00010101.

    This should solve the issue, if you can live with a result date of 0001-01-01 in these cases.

    Br,

    Kenneth

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 13, 2011 at 11:44 AM

    Praveen,

    Its strange.

    I think you have explicitly handle this exception yourself. Add condition if the value is greator than 0 then do the DateTrans

    Regards

    Ramesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 13, 2011 at 12:04 PM

    Similar discussion :[date-transfrom-function-error|date-transfrom-function-error]

    Regards

    Ramesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 13, 2011 at 12:08 PM

    hi,

    Use standard function DateTrans source format = YYYYMMDD and targer format YYYY'_'MM'_'DD with the single quote which encapsulates the underscore character.

    Mickael

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.