managing time in access

M

mikehesh

I'm trying to use access to manage my people's time. I need to be able to
round each log-in and log-out to the nearest 15 minute interval before I
calculate time(I.E. log-in at 6:06 needs to be considered 6:00). Does anyone
know an expression/formula the would allow me to do this?
 
J

John W. Vinson

I'm trying to use access to manage my people's time. I need to be able to
round each log-in and log-out to the nearest 15 minute interval before I
calculate time(I.E. log-in at 6:06 needs to be considered 6:00). Does anyone
know an expression/formula the would allow me to do this?

FixTime: CDate(Fix(Now()*96)/96)

will round down (e.g. 6:06 => 6:00, 6:14:59 => 6:00);

RoundTime: CDate(Fix(Now() * 96 + 0.5)/96)

will round to the nearest. There are 96 15-minute intervals in a day, and a
Date/Time value is stored in days and fractions of a day.
 

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

Similar Threads


Top