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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dropping the last character if it is something I don't need?

Status
Not open for further replies.

silverseed71

Programmer
Oct 15, 2014
1
0
0
US
I have a string that is exactly 6 characters long but I want to cut off the last character if it ends with a "."

for example:

231.13
209.43
671.22
265.6. <---------If there is a period at the end I would like to cut the 6 character field down to 5 characters.

Any help would be greatly appreciated.
 
@remove
WhilePrintingRecords;
if right({yourstring},1)="." then
left({yourstring},5)
else {yourstring};
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top