Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Average of Time()
Message
From
12/03/2000 01:28:39
 
 
To
11/03/2000 23:07:29
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00344661
Message ID:
00344675
Views:
22
You can use report variables. Define a variable nSeconds which has the following formula as Value to Store:

int(TimeOnsite) * 60 + (TimeOnSite - int(TimeOnSite)) * 100

Define another variable nAvgOnSite, as avg of nSeconds. In the group footer display

ltrim(str(int(nAvgOnSite))) + " minutes and " + ltrim(str((nAvgOnSite - int(nAvgOnSite)) * 100))

Vlad

>I have this report which displays Time In , Time Out, and the difference between them as Character fields in a report. The difference field is calculated and in the table.This has been calculated and converted to a decimal fraction. ie 2.25 minutes = 2 minutes and 15 seconds. The total column has an average of this difference using the AVG() function in the report.
>
>The client now wants the diff time in actual minutes and seconds - 2.15 = 2 minutes 15 seconds rather than in decimal base 10.
>
>The problem is in getting the totals and the Average difference as the records are grouped by client.
>
>Any wat this can be done. See below for how the report is needed:
>
>CLIENT NAME: AABB Transport Co.(group by)
>
>Time In Time Out Time Onsite
>12:45 13.25 00:40
>12:55 14:05 01:10
>-------------------------------
>Average Onsite == 00:55
>
>Client Name: Next Transport Co:
>
>
>
>.... and so on
>
>I need the 00:55 to be calculated
>
>Thanks
>
>Bernard
Previous
Reply
Map
View

Click here to load this message in the networking platform