Converting time!

F

Floyd Forbes

Is there a way to convert time e.g 8:30 to 8.50 or 8:12 to 8.25 in Access?

Floyd
 
F

Floyd Forbes

Is it possible to make e.g 8:00 - 8:07 to 8.00, 8:08-8:22 to 8.25, 8:23-8:36
to 8.50.
I'm trying to .25,.50,.75.

Floyd
 
V

Van T. Dinh

?Round(#8:07# * 96) / 4
8

?Round(#8:08# * 96) / 4
8.25

?Round(#8:07# * 96) / 4
8

?Round(#8:08# * 96) / 4
8.25

Check your boundary conditions. I think it should be 8:23 to 8:37 for the
0.5.
 
J

John Vinson

Is it possible to make e.g 8:00 - 8:07 to 8.00, 8:08-8:22 to 8.25, 8:23-8:36
to 8.50.
I'm trying to .25,.50,.75.

Try converting to an integer number of quarter-hours and then
dividing:

CInt(CDbl(TimeValue([timefield])) * 96))/4.
 

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