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!

limiting decimal places 1

Status
Not open for further replies.

DanNorris2000

Technical User
Nov 10, 2000
186
US
Is there a way to limit the number of decimal places when using the sum function on a currency field?

sum(osloss)as OSLOS results in 4 decimal places. I would like to limit to 2 places

 
Have you looked into the Set Decimal command?

David W. Grewe
Dave@internationalbid.com
ICQ VFP ActiveList #46145644
 
Try using the ROUND() function. As in:

ROUND(sum(osloss), 2) as OSLOS
 
osloss defined as currency 8

used the floowing statement:
round(sum(osloss),2) as oslos

resulted in 20 with 4 decimal places
 
Sorry, I wasn't paying attention to the fact you had said that it was a currency field. This should do what you need:

round(mton(sum(osloss)),2) as oslos
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top