IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  do we have any function which validates the date format.

    Posted 09/30/08 06:14 PM

    Originally posted by: muralee


    Hi,
    i have a text field which gets populated with date value in ccyymmdd format . is there any function which can validate the date format.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 2.  Re: do we have any function which validates the date format.

    Posted 10/01/08 04:26 AM

    Originally posted by: Ravikt


    check whether the date input=8 after removing the seperators if incase input has one. and try to read the input date.
    eg.
    FROMDATETIME(TEXTTODATE(SUBSTITUTE(In1, "-","")),"{CCYYMMDD}")
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 3.  Re: do we have any function which validates the date format.

    Posted 10/01/08 10:55 AM

    Originally posted by: janhess


    TEXTTODATE will give you a null value for an invalid date.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 4.  Re: do we have any function which validates the date format.

    Posted 10/01/08 11:21 AM

    Originally posted by: muralee


    TEXTTODATE function is returning -1 as return code , whenever its failing , iam not able to capture that error code ,

    iam trying to do like this
    if( CONTAINSERROR(TEXTTODATE(datefield)), "invalid dateformat","valid dateformat")
    or
    if( (TEXTTODATE(datefield)=NONE, "invalid dateformat","valid dateformat")
    when iam trying to execute this rules , its never coming to first argument when date format is invalid.TEXTTODATE function is returning -1 as return code.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 5.  Re: do we have any function which validates the date format.

    Posted 10/01/08 11:29 AM

    Originally posted by: janhess


    It shouldn't return -1 but 'none'. Try doing IF(ABSENT(TEXTTODATE(datefield)), "invalid dateformat","valid dateformat")
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 6.  Re: do we have any function which validates the date format.

    Posted 10/01/08 11:45 AM

    Originally posted by: muralee


    i was trying with julian date format ccYYddd, and its returning -1 return code , cant we use texttodate function for this format
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 7.  Re: do we have any function which validates the date format.

    Posted 10/01/08 12:07 PM


  • 8.  Re: do we have any function which validates the date format.

    Posted 10/01/08 12:22 PM

    Originally posted by: muralee


    i tried with TODATETIME function , and its working now , thanks for the solution
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 9.  Re: do we have any function which validates the date format.

    Posted 10/01/08 11:27 AM

    Originally posted by: raj1


    What is the format of the Argument you are giving to TEXTTODATE?Because TEXTTODATE works only for CCYYMMDD or YYMMDD formats.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender