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

get rid of .00 from field 2

Status
Not open for further replies.

vancoug

MIS
Joined
Aug 11, 2008
Messages
12
Location
US
I have a field (data type number) that always ends in .00
There is always a number preceding it, but the length varies; e.g. 1234.00; 12345.00, 123456.00

In the past I have always been able to format the field with the format editor and export as xls file, but when I try to export as Character-seperated values; it ignores the format and shows .00

I’ve experimented with different functions, including converting to string, rtrim, trimright, but I have had no luck in getting rid of the .00

I know it is probably something basic and I will use again, so any suggestion would be appreciated.
 
Format the field to have no decimal places, no formula required.

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
You could convert the number to a string and format it like this:

totext({table.number},0,"")

-LB
 
LB

Thanks- I appreciate your time.
 
If you choose File > Options > Fields you can change the defaults, including setting new fields to show without decimal places if that's what you want.

A drawback with this method is that it can change when run on another machine with defaults set.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top