handle time average (1 Viewer)

Davebest05

New member
Local time
Yesterday, 23:26
Joined
Jul 18, 2019
Messages
8
The attachment shows the results of a query I am getting.

I need to format the handle time column so that it shows hh:nn:ss format.

cant get it for the life of me.
 

Attachments

  • Capture.JPG
    Capture.JPG
    23.3 KB · Views: 53

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:26
Joined
Oct 29, 2018
Messages
21,471
Hi. How was this data result achieved? What is the data type of the original data? Have you tried using either the Format property or the Format() function?
 

Davebest05

New member
Local time
Yesterday, 23:26
Joined
Jul 18, 2019
Messages
8
I created a query to average it based on the names of the guys on the right.


The format for the data is currently hh:nn:ss

when I use the format function as follows Format([Handle],"hh:nn:ss") it gives me data mismatch type error.

thanks for your help and hope we can fix this . I can post the design details. of query and table.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:26
Joined
Oct 29, 2018
Messages
21,471
I created a query to average it based on the names of the guys on the right.

The format for the data is currently hh:nn:ss

when I use the format function as follows Format([Handle],"hh:nn:ss") it gives me data mismatch type error.

thanks for your help and hope we can fix this . I can post the design details. of query and table.
What was the data type of the original data? Was it a date/time field you averaged?
 

Davebest05

New member
Local time
Yesterday, 23:26
Joined
Jul 18, 2019
Messages
8
originally imported into access database as text from ms excel . After importing I changed the format. Thank you .
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:26
Joined
Oct 29, 2018
Messages
21,471
actually thinking of it now i realized you are right ..it was date/time.
In the Access table though, after you have moved the data from Excel, what is the data type? Also, when you average it, what is the unit of measure? Is it supposed to represent days, hours, or minutes?
 

Davebest05

New member
Local time
Yesterday, 23:26
Joined
Jul 18, 2019
Messages
8
Date/Time in ms access.
supposed to show minutes seconds or hours minutes seconds in the query and report.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:26
Joined
Oct 29, 2018
Messages
21,471
Date/Time in ms access.
supposed to show minutes seconds or hours minutes seconds in the query and report.
Hi. If the data is date/time values and you average them, then you will end up having a point in time, wouldn't you? What were those values supposed to represent? Were they supposed to be time durations instead?
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:26
Joined
Oct 29, 2018
Messages
21,471
Date/Time in ms access.
supposed to show minutes seconds or hours minutes seconds in the query and report.
Hi. Just to clarify where I'm coming from, here's an image of a table with a date/time field:



If I create a query to average the [stopdate] field, I get the following result:



I am not sure the resulting value of 42696 can be interpreted properly, let alone one to represent hours, minutes, and seconds.

Hope it makes sense...
 

Attachments

  • table.PNG
    table.PNG
    11.8 KB · Views: 161
  • avg.PNG
    avg.PNG
    3.7 KB · Views: 159

Davebest05

New member
Local time
Yesterday, 23:26
Joined
Jul 18, 2019
Messages
8
I have attached live data of what I am trying to average. These are in minutes:secdonds...handle time for each technician. I am trying to find the average of these rows. Thanks so so much for your patience.

Dave
 

Attachments

  • form1.JPG
    form1.JPG
    25.1 KB · Views: 48

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:26
Joined
Oct 29, 2018
Messages
21,471
I have attached live data of what I am trying to average. These are in minutes:secdonds...handle time for each technician. I am trying to find the average of these rows. Thanks so so much for your patience.

Dave
Hi Dave. It probably works out in your case, but I can't guarantee it does 100%. If the column you're showing in the image is a Date/Time data type, then technically, they don't represent 13 minutes and 27 seconds (for the first row showing 00:13:27). Instead, again if the field is a Date/Time data type, it means 13 minutes and 27 seconds past midnight. So, if the total sum of all the rows does not exceed 24 hours, you might be okay averaging them and just formatting them to display as hours, minutes, and seconds. However, if the total sum of those rows could exceed 24 hours, then you might get inaccurate result.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 07:26
Joined
Feb 19, 2013
Messages
16,610
not sure how you would average a date - no idea what it means.

Suggest you explain in simple english what you are trying to achieve.

Using the data you provided in your first post - explain the calculation process you need and the expected result from that data
 

Davebest05

New member
Local time
Yesterday, 23:26
Joined
Jul 18, 2019
Messages
8
not sure how you would average a date - no idea what it means.

Suggest you explain in simple english what you are trying to achieve.

Using the data you provided in your first post - explain the calculation process you need and the expected result from that data

This is the situation. I have to report on average amount of time a team of technicians has spent resolving problems .example

Technician Time - Taken Team-Name
Tim 13min 45 sec A
Tom 8 min 30 sec A
Jay 10min 9 sec B
Bill 11min 18sec B
Mac 6min 0 sec C
Mik 7min 9 sec C

Expected results

Team- Name AVERAGE time-taken
A average for team A
B average for team B
C average for team C

please let me know if I need to explain anything further.

Thanks in advance.

Dave
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:26
Joined
May 7, 2009
Messages
19,241
bring your query in design view.
remove the Format([Handle],"hh:nn:ss") from the column and instead just the column name (Handle).
on the right pane, Property Sheet->Format, put hh:nn:ss
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:26
Joined
Oct 29, 2018
Messages
21,471
This is the situation. I have to report on average amount of time a team of technicians has spent resolving problems .example
Hi Dave. As I had suspected, your data is about time duration or elapsed time and not points in time. Therefore, I would suggest you do not use a Date/Time data type. If you must include seconds in the data, then I would recommend maybe using the Long Integer data type and store all time duration in number of seconds. You can then do math with these values more accurately and simply format the result to whatever you display format you want/need.
 

Users who are viewing this thread

Top Bottom