Rounding down to nearest whole number

  • Thread starter Thread starter Russell Farr
  • Start date Start date
R

Russell Farr

Hi

Wondering if someone can help me. I'm trying to work out
how many weeks something has been active for, by
subtracting the Open Date from todays date, and dividing
it by 7.

If I declare my variable as an Integer, it always rounds
the number to the nearest whole number. However, I want
it to only round it down, not up, to the nearest whole
number.

For example, if I have something which has been active for
12.9 weeks, I want to be able to round it down to 12
weeks, not 13 weeks.

Does anyone have any suggestions?

Thanks

Russell
 
Back
Top