Seems Simple But Time Format is Not!

T

TheNovice

OK Guru's,

This is a Simple one and of course I cannot figure it out.

We just created a Form (&Table) that we will enter all of the accumilated
Idle/Drive times for the month (1706:59:45 - "hhhh:mm:ss")

I tried the h:m:s in the format field and it wont work? Should I be using
the Date/Time in the table format?

I really cant figure this out.
 
D

Douglas J. Steele

The Date/Time data type is intended to hold timestamps (i.e. specific
date/time values), not durations. Under the covers, it's an 8 byte floating
point number, where the integer portion represents the date as the number of
days relative to 30 Dec, 1899, and the decimal portion represents the time
as a fraction of a day.

I show a technique in my October, 2003 "Access Answers" column in Pinnacle
Publication's "Smart Access". You can download the column (and sample
database) for free at http://www.accessmvp.com/djsteele/SmartAccess.html

However, the appropriate thing to do is store the durations in Long Integers
as total seconds, and write your own functions to convert back and forth.
 
T

TheNovice

Mr. Steele,

I there a way to just capture the information in this format? I have the
formula to figure out the %'s. to keep them stored as seconds we would have
to convert it somehow enter then get the same results (right?).

I just need the data entry capability.

Thanks in advance,

Charles Davis
--
-The Novice
Learn Today, Teach Tomorrow

Great Success is ones ability to ask for Help.


Douglas J. Steele said:
The Date/Time data type is intended to hold timestamps (i.e. specific
date/time values), not durations. Under the covers, it's an 8 byte floating
point number, where the integer portion represents the date as the number of
days relative to 30 Dec, 1899, and the decimal portion represents the time
as a fraction of a day.

I show a technique in my October, 2003 "Access Answers" column in Pinnacle
Publication's "Smart Access". You can download the column (and sample
database) for free at http://www.accessmvp.com/djsteele/SmartAccess.html

However, the appropriate thing to do is store the durations in Long Integers
as total seconds, and write your own functions to convert back and forth.
 
D

Douglas J Steele

Assuming you're asking can you enter a value like 1706:59:45 into a
date/time field, the answer is no.

You'd have to enter it into an unbound text box, then apply a function to it
to convert it to the number of seconds.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


TheNovice said:
Mr. Steele,

I there a way to just capture the information in this format? I have the
formula to figure out the %'s. to keep them stored as seconds we would have
to convert it somehow enter then get the same results (right?).

I just need the data entry capability.

Thanks in advance,

Charles Davis
 
Top