Extracting parts from a series of underscores like 448_2021_2_2021_3_1_56
I am having trouble extracting certain parts from the code like 217_2021_2_2021_3_1_56, that first three digits is the phase code, then year, then month, then another year, another month, version, and location code. Month and version numbers could be one or two digits depending on the date, so not sure about the best and easiest to extract each information in a separate line item. Any help is extremely appreciated.
If the string has a fixed number of characters every time, you always have 3 characters, then 4 etc.
Set those positions in a constants system module and use MID. Don't find the positions by calculation as they will always be the same if the string format is fixed.
Also, your code has a date in it, this goes against best practice. It is better create that code to define the uniqueness of the item and dimension that by time. Hopefully this is part of that process...
See this article by @rob_marshall → Data hubs: purpose and peak performance - Anaplan Community1
Thank you Mark. Although the number of characters are not fixed, I believe I figured out the solution. Thanks.0