Calculating Time in new field

R

Ray W

I have two Date/Time (general date and time) fields that I need to calculate
the difference between the two. I'm only interested in the hh:mm:ss that have
elapsed between the two.
I've already added the field to the table (MTTR) but I will need to perform
an update query that adds this calculation into the new field. And I would
like to have the calculation performed as I a .csv file.

Thanks,
 
G

Georgia Bryant

Ray W said:
I have two Date/Time (general date and time) fields that I need to
calculate
the difference between the two. I'm only interested in the hh:mm:ss that
have
elapsed between the two.
I've already added the field to the table (MTTR) but I will need to
perform
an update query that adds this calculation into the new field. And I would
like to have the calculation performed as I a .csv file.

Thanks,
 
R

Rastro

As Doug said export the result of the query:

SELECT RecordID, Format([Check_Out]-[CheckIn],"hh:nn:ss") AS DifTime
FROM YourTable;

Rastro
 
J

John W. Vinson

As Doug said export the result of the query:

SELECT RecordID, Format([Check_Out]-[CheckIn],"hh:nn:ss") AS DifTime
FROM YourTable;

Rastro


Ray W said:
I have two Date/Time (general date and time) fields that I need to
calculate
the difference between the two. I'm only interested in the hh:mm:ss that
have
elapsed between the two.
I've already added the field to the table (MTTR) but I will need to
perform
an update query that adds this calculation into the new field. And I would
like to have the calculation performed as I a .csv file.

Thanks,

Just note that this will fail for times exceeding 24 hours. Subtracting two
date/time values gives a Date/Time value, a double float count of days and
fractions of a day since midnight, December 30, 1899; so a duration of 26
hours will correspond to #12/31/1899 02:00:00# and will display as "02:00:00".
 

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