Delete Character from String In specific positionHello,
I am looking to create a script to remove a character from a string while ignoring the same character earlier in the string.
For example, from a data table I have a special DateTime of YY/MM/DD/hh:mm and wish to remove the third / (ie character 9).

Thank you for any help,
Luke
AnalyticsData TableScriptingWindowsRe: Delete Character from String In specific positionThere are many approaches. If the strings are always the same length, etc, I might use a formula column with
Left( DateTime, 8 ) || "T" || Right( DateTime, 5 );
You might want a separator like T which is used by one of the international formats, yyyy-mm-ddThh:mm.
If there is some variation, but maybe always the third /, I might use regex in the formula column
Regex( DateTime, "^(\d+/\d+/\d+)/(\d+:\d+)$", "\1T\2" );
^ and $ anchor the match to the beginning and end of the DateTime string. \d+ matches 1 or more digits. The parens make groups, and the two groups are referenced with \1T\2 to build the result value.
Re: Delete Character from String In specific positionHello Craige, I have tried that but seem to be getting errors when trying to use it:

I may be understanding it incorrectly as I am attempting to create a new column with the data:

Also apologies, for some reason I was unable to send as a JLS script to required screencap