Skip to main content

Taking hyphens out of data using textual rules

Comments

1 comment

  • David Paras

    Hi Sherry,

    Is your input date format consistent? If so, you can hard code a hyphen check for the 3rd character. For example:

    If your input date format is mm-dd-yyyy, than you can substring the 3rd character substring (inputdate,3,3) and use the boolean function equals to check if it is a hyphen equals (substring(inputdate,3,3))

    If the equals value is true, then you can substring the date and concatenate the non-hyphen characters

    concat(substring(inputdate,1,2),substring(inputdate,4,5),substring(7,10)

    If the equals value is false, then you can do a direct map


    0

Please sign in to leave a comment.