Convert / Store time

D

David G

Hi All

I need help converting time values and storing them in Access. I need to
store them in a table as mm:ss. Basically, these are to measure how long it
takes to produce a widget, e.g. 10mins & 45 secs. I also want to convert
decimal hours to minutes and seconds e.g. 3.50 = 3 and a half hours =
210mins. Also how do I make %change comparisons between 2 times, e.g. 10mins
30secs to 5mins 15 secs is a 50% decrease? Maybe there is a handling times
tutorial on the web somewhere? Any help appreciated.
Thanks
 
A

Allen Browne

David, can I suggest that you store these values as a number of seconds,
i.e. in an Integer field.

You can then display them as minutes and seconds as explained here:
Calculating elapsed time
at:
http://allenbrowne.com/casu-13.html

In general, this is the best way to store durations. It also makes very easy
work calculating your percentages.
 

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