Converting seconds to hh:nn:ss format

gracegrenier

Registered User.
Local time
Today, 00:03
Joined
Aug 31, 2012
Messages
11
Hello,
I am making a report that takes total seconds that it takes to do something and converts it to hh:nn:ss. In a different report I use

=Format(Int(Sum([IT Total Seconds])/3600),"00") & ":" & Format(Int((Sum([IT Total Seconds])-(Int(Sum([IT Total Seconds])/3600)*3600))/60),"00") & ":" & Format(((Sum([IT Total Seconds]) Mod 60)),"00")
To give me the sum of a group of records that I get from a query. But I need to make a report that just gives me the detail, one record at a time. So, I tried to take Sum out of the above, but I just can't get it right. Can anyone help?
Thanks,
gg
 
But I need to make a report that just gives me the detail, one record at a time.

If I recall from your previous thread, this had to do with call times and your individual records already stored each call time in hh:nn:ss, so you would just return the field value as is with no formatting at all if you need hh:nn:ss displayed for each record in your report.

Maybe I'm misunderstanding your question?
 
Good morning Beetle Bailey,
You have a good memory. The way I solved the problem of the earlier thread was to break out the hours, minutes and seconds into separate fields in the data entry form. Then I made an non visible field where I multiplied the hours by 3600, minutes by 60 and added all that to the seconds creating a "Total Seconds" field in the table. So, when I created the report, I used Sum with no detail and inserted

=Format(Int(Sum([Total Seconds])/3600),"00") & ":" & Format(Int((Sum([Total Seconds])-(Int(Sum([Total Seconds])/3600)*3600))/60),"00") & ":" & Format(((Sum([Total Seconds]) Mod 60)),"00")
into the control source of the form and it worked perfectly. Then I created another report that would show the detail and I tried to put the same format (minus all the Sums) in the control source for the detail, but it wouldn't work. I went home last night and made a small little database so I could keep working that issue and finally realized that there was something different about the format of the text box for the detail in the report. So I deleted that box and inserted another tex box and the format above (without the "Sum") worked perfectly. So, I came in to work this morning and deleted the text box and inserted a new one and again it works. So, problem solved and I think this is a good one to remember.
Thank you for your time.
gg
 

Users who are viewing this thread

Back
Top Bottom