Hi How can I replace the month behind to number in calculation?
Example below Jan will be replace with "1" follow by -[number].
26243-Jan
1-26243
99-Feb
2-99
7328-Mar
3-7328
In my decision for checking, I apply like this
InStr(Trim([intRepOrder]), "Jan")<>0
[TEXT] is the data item having values like 26243-Jan, 99-Feb etc
Step 1: Use this in calculation stage Right([TEXT],3)&"-"&Left([TEXT],"-")-1)
This will convert 26243-Jan to Jan-26343
Store this back in [TEXT]
Step 2: Use a long REPLACE statement to replace Jan=1,Feb=2,March=3 & so on.
Replace(Replace(Replace([TEXT],"Jan","1"),"Feb",2),"Mar","3")
In similar fashion, use 12 replace conditions(one for each month), nested into a single statement.
My bad.I tried as suggested, I'm hitting error "Can't subtract from Text". I apply my data type as Text.
My bad.
Here is the correct syntax : Right([TEXT],3)&"-"&Left([TEXT],InStr([TEXT],"-")-1)