How to round in query

S

SAL

I would like to round to the dollar 189.95 to 189.00 or 189.45 to 189.00.
Ignoring the decimal value. Please help.
 
O

Ofer

You can use
Round(MyNumber)
Format(MyNumber,"#")
Cint(MyNumber)

All of the above will return 190 for 189.95, if you want 189 to be returned
you can subtract 0.5 from the number

Round(MyNumber-0.5)
Format(MyNumber-0.5,"#")
Cint(MyNumber-0.5)
 
V

Van T. Dinh

Create a new calculated Field:

RoundedVal: Int([YourField])

Check Access VB Help on the Int() function.
 
Top