G Guest Apr 24, 2005 #1 From Access code, how do I round to the nearest integer given a double data type? E.g. #1 round "15.5" to 16 E.g. #2 round "15.4" to 15
From Access code, how do I round to the nearest integer given a double data type? E.g. #1 round "15.5" to 16 E.g. #2 round "15.4" to 15
P Paul Overway Apr 24, 2005 #3 Cint doesn't round numbers properly, i.e., Cint(2.5)=2, Cint(3.5)=4, etc. Better to use something like this... http://www.mvps.org/access/modules/mdl0054.htm -- Paul Overway Logico Solutions http://www.logico-solutions.com
Cint doesn't round numbers properly, i.e., Cint(2.5)=2, Cint(3.5)=4, etc. Better to use something like this... http://www.mvps.org/access/modules/mdl0054.htm -- Paul Overway Logico Solutions http://www.logico-solutions.com
K Ken Snell [MVP] Apr 25, 2005 #4 "proper" is in the eye of the beholder... < g > I'd overlooked the "banker's rounding" discussions.... It works the way I always do rounding.. < g >
"proper" is in the eye of the beholder... < g > I'd overlooked the "banker's rounding" discussions.... It works the way I always do rounding.. < g >