-
September 17th, 2012, 10:30 AM
#1
[RESOLVED] Trimming the end of a string
I need to trim the last 4 characters off a string that is not consistent in length.
Ex: PG 02466 - 0 needs to be PG 02466
03300 - 1 needs to be 03300
03 30 00 - 0 needs to be 03 03 00
The last 4 characters will always be ' - #'
Any ideas?
-
September 17th, 2012, 11:27 AM
#2
Re: Trimming the end of a string
Welcome to CodeGuru forums!
If it is Crystal Reports, then :
I would use the Left and the Length functions, as :
Code:
Left({Tablex.Fieldx}, Length({Tablex.Fieldx}) - 4)
Last edited by jggtz; September 19th, 2012 at 03:45 PM.
Reason: {}
JG
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...
-
September 17th, 2012, 01:29 PM
#3
Re: Trimming the end of a string
You are awesome. That was the last piece I needed!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|