Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Removing chars Post Reply Post New Topic
Author Message
Goldberg
Groupie
Groupie
Avatar

Joined: 15 Apr 2011
Location: Portugal
Online Status: Offline
Posts: 58
Quote Goldberg Replybullet Topic: Removing chars
     Posted: 24 Oct 2011 at 3:49am
Hello,

I have a string that gives the abreviation of a school course, like the following:

INF2_2011/2012
COM1_2011/2012
...

I'd like to know how can you trim it so that it removes the last 10 chars, turning it into "INF2", "COM1" ...


Thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 24 Oct 2011 at 4:14am
one way...
mid(table.field,1,length(table.field)-10)
 
IP IP Logged
Goldberg
Groupie
Groupie
Avatar

Joined: 15 Apr 2011
Location: Portugal
Online Status: Offline
Posts: 58
Quote Goldberg Replybullet Posted: 24 Oct 2011 at 4:42am
Worked perfectly.

Thanks, DBlank.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum