Need help to round to nearest 5 minue interval

Dear all,

I need to round the value returned by now(4) to nearest 5 minutes interval which is less than the value returned by Now(4). For example, if the value returned by Now(4) is 94350, it should be rounded to 94000.

Any help please!

Quick posible response (don't tested):

You want to divide the time in 5 minute full "slices":

SliceCount = Now(4) / 500;
FullSlices = Int(SliceCount);
ReconstructedTime = FullSlices*500;

Hope this helps...

Thanks a lot, it helped

Simply search the forum for "rounding". Here's an example that answers your question:

1 Like