Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Average of Time()
Message
From
14/03/2000 21:13:57
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00344661
Message ID:
00345638
Views:
25
>Bernard,
>
>assuming you have datetime type values and they don't span more than a day:
>
>lnElapsedTime = tOut - tIn
>? ttoc( {^2000-01-01 00:00} + lnElapsedTime, 2 )
>
>Will give you a string in hh:mm:ss format. lnElasped could also by average time in seconds too.
>
>>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


Actually both assumptions are wrong.

The time is in a CHR field
The Dates could span days

Now what?

Any ideas?

Bernard
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform