| Author |
Topic  |
|
|
Thomas M
Germany
Posts |
Posted - 07/08/2005 : 03:41:05 AM
|
Origin Version (Select Help-->About Origin): 7.5pro Operating System: W 98
Hi everybody,
I have a problem with some files. In one row there is a code wich looks as follows:
xxxx_1_15 xxxxxx_1_17 xx_1_19
The "x" stands for different numbers, with different length and wich are not of any interst for me. The "_1_15" stands for 15. January and thats what I want to have. So, does anybody has a suggestion how to turn:
xxxx_1_15 to 15.01. xxxxxx_1_17 to 17.01 xx_1_19 to 19.01.
by a script, cause I dont want to do it by hand for more than 200 rows. |
|
|
Mike Buess
USA
3037 Posts |
Posted - 07/08/2005 : 06:58:13 AM
|
The problem is similar to finding the wks and column names of the dataset data1_B.
%A=xxx_1_15; %A=%[%A,>'_']; // 1_15 %M=%[%A,'_']; // 1 if(%M<10) %M=0%M; // 01 %N=%[%A,>'_']; // 15 if(%N<10) %N=0%N; %A=%N.%M; // 15.01 %A=; 15.01
...You can also use '_' as a token separator as follows.
%A=xxx_1_15; %M=%[%A,#2,_]; // 2nd token (month) if(%M<10) %M=0%M; %N=%[%A,#3,_]; // 3rd token (day) if(%N<10) %N=0%N; %A=%N.%M; %A=; 15.01
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 07/08/2005 09:38:09 AM |
 |
|
|
Thomas M
Germany
Posts |
Posted - 07/11/2005 : 06:55:55 AM
|
| Thank you! :) |
 |
|
| |
Topic  |
|
|
|