Taking hyphens out of data using textual rules
I have a couple customers trading the same data. One puts hyphens in their date and the other doesn't. I'm new to Adeptia and I have tried every which way I can think of using textual rules to get the hyphens stripped when present. Can anyone show me what the textual rule needs to look like? I've tried an IF with 'contains'. I've tried breaking the date up positionally and storing the year in a variable, the month in a variable and the day in a variable and concating all three variables when a certain condition exists and I get nothing. Thanks.
-
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.
Comments
1 comment