Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extract characters by position in a string

Status
Not open for further replies.

deemat

MIS
Jan 20, 2006
24
US
I'm trying to extract the 6th and 7th position characters in a string. But I'm getting those characters plus the remaining characters in the field. Example, If I have 65478HTGF.
I need to just show HT.

I am using Mid(table.field,6.7) but I get HTGF as a result. Any help would be greatly appreciated. Thanks,
 
An alternative approach (and Crystal almost always has more than one way to achieve what you want) would be:

Code:
{table.field}[6 to 7]

Cheers
Pete

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top