Format a field for Time, but as duration?

M

Matt D Francis

Hi,

I have a field in a table where users enter the time a task took. This is
entered in minutes, such as 90 minutes (1hr 30mins)

The field is currently a Number field which works but I can see that will
cause problems when we come to analyse the data and need to total the hours
and minutes.

What is the best way to format the field in the tabel so that the data will
actually be held in hours and minutes (but not time of day) and can therefore
be used to summarise without adding calculations to it?
 
J

Jeff Boyce

Matt

Access offers the Date/Time datatype, which ONLY stores point-in-time data.

To handle hours & minutes (and seconds and ...), you'll have to "roll your
own". You can use a combination of fields ([HoursField], [MinutesField],
....) and/or you can use a "lowest unit of measure" approach ("enter the
total number of minutes") and parse it into hours/etc. for display purposes.

Check the mvps.org/access website for additional ideas.

Good luck

Jeff Boyce
<Access MVP>
 
M

Matt D Francis

Thanks guys - was hoping for a "easy just click on X" type answer but this
will do! I will check them out, thank-you

Matt
 
K

KARL DEWEY

Why not use a Start and End field? People fudge less if they have to enter
the two times.
 

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