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.  Validating a text field with Datetime field.

    Posted 03/18/13 05:22 PM

    Originally posted by: SystemAdmin


    Hello,
    I'm trying to validate TEXT input field has a DateTime format and it's not validating properly. I changed my data to a invalid date format/value but it's not validating at all. Any help will be greatly appreciated.

    =IF(
    VALID(
    TODATETIME(
    HLTHCOV_COV_EFF_DT Field:HEALTH_COV_RECORD:DETAIL:CopyBook,
    "{CCYYMMDDHH24MMSS}") ),
    "INVALID"
    ) = "INVALID" ,
    "Incorrect DateTime format",
    NONE
    )
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 2.  Re: Validating a text field with Datetime field.

    Posted 03/19/13 01:35 PM

    Originally posted by: SystemAdmin


    Hi,

    the VALID function can't help you there, it's not designed for this usage.

    Depending on the sub-class for your output item, there could be different ways of doing this.

    If you use a TEXT item (which seems the easiest way) then
    =IF ( EITHER ( FROMDATETIME(TODATETIME(HLTHCOV_COV_EFF_DT Field:HEALTH_COV_RECORD:DETAIL:CopyBook,"{CCYYMMDDHH24MMSS}") )),\
    "INVALID")="INVALID", "Incorrect datetime format")

    might be close to what you want (I did NOT test this, nor did I check the rule is valid, but it should be)
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 3.  Re: Validating a text field with Datetime field.

    Posted 03/19/13 02:11 PM

    Originally posted by: SystemAdmin


    Thank you so very much...I just twicked it a little bit but it works wonderfully. Thank you so very much again.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange