Printer Version | Table of Contents | Project Home Page |
EXAMPLE....: Fdate /Fsubstr /A-2 /Qabcd CALCULATION: StartColumn = length(ParmQ) + 1 + ParmA StartColumn = 4 + 1 + (-2) = 3
.EXAMPLES....: using a negative start positionFdate /Fsubstr /A7 /B2 /Q"STEVE FERG" ===> "FE" Fdate /Fsubstr /A7 /Q"STEVE FERG" ===> "FERG" Fdate /Fsubstr /B5 /Q"STEVE FERG" ===> "STEVE"
.DISCUSSION..:Fdate /Fsubstr /a-6 /B3 /Q"1994 Jun 03" ===> "Jun rem extract the rightmost 6 characters of a string Fdate /Fsubstr /a-6 /Q"1994 Jun 03" ===> "Jun 03" rem pad YEAR environment variable to the left with zeroes, rem to make sure it is 4 bytes long Fdate /Fsubstr /A-4 /q0000%year% /vyear
Fdate /Fsubstr /A7 /Q"STEVE FERG" ===> "FERG" Fdate /Fsubstr /A7 /Q"STEVE FERG" ===> "FERG" Fdate /Fsubstr /A7 /Q"STEVE FERG" ===> "FERG"