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

Separating before and after decimal point

Status
Not open for further replies.

xyner

Technical User
Mar 9, 2001
1
US
Can someone point out the following? I have a formula that creates a number. For example, let's say 16.00223995. I'm trying to create two additional formulas. The first one would take 16, before the decimal point. The second would take .00223995 including the decimal point. Since this number will always change, the length will differ at times. Thus, I can't use trim, etc.
 
xyner: You may find it quicker in future to post formula questions to the Crystal Reports - Formula forum.

The solution is to have 2 formula fields as follows:

Truncate(field,0) - this will return 16 in your example

Remainder (field/16) - this will return 0.00223995 in your example BUT this will only display to either the default decimal places or the chosen format decimal places - you can have up to 15 places I think David C. Monks
david.monks@chase-international.com
Accredited Seagate Enterprise Partner
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top