Time format setting needed

  • Thread starter Thread starter Dennis Snelgrove
  • Start date Start date
D

Dennis Snelgrove

What is the format setting for a cumulative time entry? I need a total of
how much time a number of records adds up to, but I can't get the format to
show me a time like "173:52" for one hundred seventy three hours and fifty
two minutes.

Thanks for any help...
 
Dennis said:
What is the format setting for a cumulative time entry? I need a total of
how much time a number of records adds up to, but I can't get the format to
show me a time like "173:52" for one hundred seventy three hours and fifty
two minutes.


DateTime values and formats are aimed at points in time, not
durations. However, if your time entries are less than 24
hours, you can enter them (the date part of the DateTime
field is defaulted to 0, wich is 30 Dec 1899). WHen you
start summing these times you then run into values grater
then 24 hours and the integer part represents the days since
30 Dec 1899.

What all that boils down to in your case is that you can not
do it in the Format property. You need to use an expression
to calculate the format from the number of hours in the
integer part of the sum plus the fractional part of a day:

Format(24*Int(time) + DatePart("h",time), 0) & ":" &
Format(time, "nn")
 
Back
Top