I

#### Ian

This will be used in a total time field where I need to

round to the nearest quarter hour.

Thanks

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

I

This will be used in a total time field where I need to

round to the nearest quarter hour.

Thanks

K

4.13 rounds to 4.25

4.28 rounds to 4.25

4.12 rounds to 4.00

4.92 rounds to 5.00

This expression should get you pretty close:

(((MyNumber * 100) + 12.1) \ 25) / 100 * 25

I

Thank you, you're a genius!!! I'll try that tonight

Ian

Ian

D

=Round(v * 4)/4

This will give variable answers around the odd 8ths of the hour

(7.5 minutes, 22.5 minutes, 37.5 minutes and 52.5 minutes) but

is ok otherwise - anything you do with exact minutes should be

alright.

The variation is due to rounding errors in the binary

representation, combined with technical details of the

implementation of Bankers Rounding used by Round.

NOTE that this will only give you 1/4 hours if V is fractional

hours to start with. VB/Access times are fractional DAYS, so

if you are starting with a time value you might consider using

something like this:

dtval =round(dtval * 4 * 24) /(4 * 24)

(david)

I

Your expression works perfectly but I'm just curious,

what does the "\" symbol do in the calculation?

Thanks

Ian

K

numbers and then truncates the answer to the integer portion only.

Examples:

5 \ 2 = 2 (from truncation of 2.5)

11 \ 3 = 3 (from truncation of 3.67)

etc.

G

am rounding to the nearest mutliples of 5.