Help with rounding numbers
Hello
I was wondering if anyone could help me to round down a number that is the result of an equation. The current equation Im using is
DateDiff("H", tme, ltme)
But when the equation is executed if; say the result is 2.788 it will round to 3, now i was wondering if someone could give me a code that would make the result round down; i.e 2.788 will display as just 2.
Any Help would be great, Thanks!
# 2 Re: Help with rounding numbers
That is strange, because DateDiff returns a Long, not a Double...
use Minute instead of hours, and divide the result by 60 using integer divide \ instead of /
mstraf at 2007-11-11 17:23:54 >

# 4 Re: Help with rounding numbers
...for more info than you 'll ever need about rounding:
http://support.microsoft.com/kb/196652/EN-US/#XSLTH3170121122120121120120
Sigid at 2007-11-11 17:26:00 >

# 5 Re: Help with rounding numbers
If you want to 'round down', then use Int(x)
gupex at 2007-11-11 17:26:59 >
