I want to make sure the date of the file I get are two digits, if the dates send in as one digit, it will stop the script.
but I dont know how to make the script distinguish bettween number and text.
Let>orgfile=11-20Name
//if I get the file with one digit "1-20Name" the script ends
MidStr>%orgfile%,1,1,ONEDIGITMONTH
If>%ONEDIGITMONTH%=-,END
//if I get the file with one digit "10-2Name" the script ends
MidStr>%orgfile%,5,1,ONEDIGITDATE
If>%ONEDIGITDATE%=(NOT A NUMBER),END
label>END
The month works, but I dont know how to do the date
thanks
check number and text
Moderators: Dorian (MJT support), JRL
While I have no idea what you are actually trying to accomplish, here is one way to distinguish between Alpha and Numeric.
let>ValidNum=0123456789
let>SomeString=1234K5678
MidStr>%SomeString%,5,1,SearchThis
Pos>SearchThis,ValidNum,1,CheckThis
if>CheckThis>0
mdl>%SearchThis% is numeric
else
mdl>%SearchThis% is Alpha
endif
let>ValidNum=0123456789
let>SomeString=1234K5678
MidStr>%SomeString%,5,1,SearchThis
Pos>SearchThis,ValidNum,1,CheckThis
if>CheckThis>0
mdl>%SearchThis% is numeric
else
mdl>%SearchThis% is Alpha
endif