rounding to closest 15 minute increment

R

regm

I need help rounding time to the nearest 15 minute increment. The expreesion
I have so far is datediff("n",[Start Time], [End Time])

It gives me the result in minutes which is fine but I am trying to round
tghat number to the nearest 15 minute increment.

Please help

thanks
 
A

Allen Browne

June7 has answered your specific question. If you want something generic,
here's a custom function that lets you round to the nearest minute, 10
minutes, hour, day, whatever:
http://allenbrowne.com/round.html#RoundTime

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.


June7 via AccessMonster.com said:
FormatNumber(Minutes / 15, 0) * 15

I use Format or FormatNumber because the Round function uses an even/odd
rule
for rounding on 5.
Ex: 4.57 would round to 4 and 5.57 would round to 6.
I need help rounding time to the nearest 15 minute increment. The
expreesion
I have so far is datediff("n",[Start Time], [End Time])

It gives me the result in minutes which is fine but I am trying to round
tghat number to the nearest 15 minute increment.

Please help

thanks
 

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

Top