Rounding down to nearest whole number


Russell Farr


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

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?



Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question