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

Rounding down

Status
Not open for further replies.

rajasan77

Programmer
Jan 12, 2010
30
US
Can any one of you tell me how to round the value down?
Ex:
1.56 to be rounded as 1.00
2.32 to be rounded as 2.00
 
Floor(1.56) if they are hard coded values or Floor{table.field} for database field
 
elsenorjose's solution would give you 1 and 2, but you asked for 1.00 and 2.00.

You could get these by
Code:
ToText(Truncate({your.field}, 0), 2)
I use truncate because I'm familiar with it. Floor would probably also work. Please try it and let us know.

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

Part and Inventory Search

Sponsor

Back
Top