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

change double 3 decimal places to 2 decimal places 2

Status
Not open for further replies.

ksbigfoot

Programmer
Apr 15, 2002
856
CA
I have a field of type Double, it originally had 3 decimal places. I changed it to 2 decimal places, but the 3 decimal places are still in the table.

How would I change the numbers to 2 decimal places?
 
Round(TheNumber, 2) - If you want rounding

or

Int(TheNumber * 100#) / 100# - If you just want to chop
 
Use an update query

UPDATE yourTableName
SET yourFieldName = Round(yourFieldName , 2)

or

UPDATE yourTableName
SET yourFieldName = Int(yourFieldName * 100#) / 100#

 
Thanks Golom & JerryKlmns,
Makes sense now. Thanks again and star to you both.
ksbigfoot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top