Skip to Content

Date

Hi,

1) Convert from YYYY-MM-DDTHH:MM:SS+HH:MM to DDMMYY

2) Convert from YYYY-MM-DDTHH:MM:SS+HH:MM to YYYYMMDDHHMMSS

Here TimeStamp Begins with T

V can use standard date function or else V Need to write any UDF .

Thanks in Advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 13, 2009 at 10:39 AM

    Hi,

    I dont think it can be converted using standard dataTrans function, write UDF for this.

    Regards,

    Phani

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 13, 2009 at 10:42 AM

    Hi Praveen,

    I think you can achieve your requirement by the date transformation std functionality provided in graphical mapping.

    Regards

    joel

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 13, 2009 at 10:43 AM

    Hi Praveen,

    Praveen Says..

    V can use standard date function or else V Need to write any UDF .

    In both ways you can do it. but standard date function will be easier.

    Use standard function ""TransformDate".

    Go to properties --> In "Format of Source Date" click on question mark at right hand side --> then click on "Create Pattern". There you can define your own pattern.

    Regards,

    Madan Agrawal

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 13, 2009 at 10:46 AM

    You can simply achieve with Stand. DateTrans function. Just use Substring function before mapping to DateTrans function.. and substring first 10 char from source field.. e.g.

    Source_Date ---> Substring (0..9) -> DateTrans(under properties set you desired pattern)-> Target_Date

    Hint: Substring & concatenate the source field first then pass to DateTrans function...accordingly.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      If you use standard dataTrans function it will not work, but as Sarvesh said if use substring and then dateTrans then it will work.

      Regards,

      Phani

  • avatar image
    Former Member
    Apr 13, 2009 at 11:35 AM

    Hi Praveen,.

    You can achieve this using standard function.

    For the first instance try like this :

    Input-> substring (0..10) -> TransformDate ( GO in properties: Give source format as YYYY-MM-DD and target format as DDMMYY) -> Output

    Here substring will take first 10 characters, that is characters that are coming before "T" , and then transfor it to desired format.

    Br,

    Ritu

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 13, 2009 at 01:41 PM

    Hi,

    Check my answer in this thread...exactly same problem solved:)

    date-time-conversion

    i think i answered to your Q itself in the above thread.....wasn't that issue solved??

    Regards,

    Abhishek.

    Edited by: abhishek salvi on Apr 13, 2009 7:15 PM

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Praveen Reddy BK

      hi,

      You are bound to get this error if your source date format is not according to what mentioned in the DateTransform function of mapping.....you should not have a varying Date format in this case....make 100% sure that the date format is the same in the source message and in the Datetransform properties.

      If you mention that source date is of format DDMMYYYYHH:MM:SS then it has to be in that format only....DDMMYYYY will give you error.

      Regards,

      Abhishek.

  • avatar image
    Former Member
    Apr 13, 2009 at 08:03 PM

    Hi

    Go Ahead with UDF , which will give you the better and exact result

    Add comment
    10|10000 characters needed characters exceeded