Counting time [h]:mm

  • Thread starter Thread starter Patrick D via AccessMonster.com
  • Start date Start date
P

Patrick D via AccessMonster.com

I import from another program the prestations of our workers, i have to add
up the duration.
In Excel i can use the custom format [h]:mm. Is there in Access a similar
function i can use?

Thx
Patrick
 
Not really. Access doesn't have a Time data type. The closest there is is
the Date data type, which is intended to store a timestamp (i.e.: date and
time both). This is because, under the covers, a Date data type is an 8 byte
floating point number, where the integer portion is the date as the number
of days relative to 30 Dec, 1899 and the decimal part is the time as a
fraction of a day.

The normal recommendation is to decide what resolution you need for your
times (minutes only or minutes and seconds), and store the times as Long
Integers representating that number of minutes (or seconds). It's not
particularly difficult to write functions that convert from h:mm to minutes
and from minutes to h:mm.

I did show a work around using Date fields in my October 2003 Access Answers
column for Pinnacle Publication's Smart Access. You can download the column
(and accompanying database) for free at
http://www.accessmvp.com/djsteele/SmartAccess.html
 

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

Back
Top