Totaling up the hours
From: Terry (anonymous_at_discussions.microsoft.com)
Date: 04/08/04
- Next message: And: "Hide Group Header depending on the content"
- Previous message: Niklas Östergren: "Dynamic report (is it possible?)"
- In reply to: Ginger: "Totaling up the hours"
- Next in thread: Ginger: "Totaling up the hours"
- Reply: Ginger: "Totaling up the hours"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 7 Apr 2004 22:18:56 -0700
Ginger,
I didn't test my response (till now).
To get around this
=sum(format([TimeDifferenceField],"0.00"))*24&" hours"
This will format the timedifferencefield into a normal
number and allow sum and multiplication operations to be
performed.
I hope this works a bit better for you.
Terry
>-----Original Message-----
>Hi,
>
>I tried doing that but it keeps on giving me error
>message " Data type mismatch". I use both the formulas
>with the same result.
>
>Fyi, my data type for StartTime and EndTime are set to
>Date/Time. My formula for Time Difference on the query is
>DiffTime: Format([StartTime]-[EndTime],"Short Time").
>
>Can you pls advice?
>
>Thanks.
>
>Regards
>Sze Mei
>
>
>>-----Original Message-----
>>Ginger,
>>
>>In the report footer (or an appropriate group footer)
put
>>a control and set it's control source to =sum
>>([TimeDifferenceField]). If the totals are less than 24
>>hours you can probably get away with formating the
>control
>>to display hours. If you are after "larger" quantities
of
>>hours you will need to massage the result.
>>eg. =format(sum([TimeDifferenceField])*24,"0.00")&"
hours"
>>This will convert the fractional measure of hours to a
>>unit per hour and give you two decimal places. The
result
>>should look something like 145.46 hours.
>>
>>hth,
>>
>>Terry
>>
>>>-----Original Message-----
>>>I have two fields, i.e. StartTime and EndTime.
>>>I calculated the difference between those two times on
>>>Query.
>>>
>>>Now, I would like to do a total for the time
differences
>>>on the report. I'm not sure how.
>>>
>>>Can somebody help me?
>>>.
>>>
>>.
>>
>.
>
- Next message: And: "Hide Group Header depending on the content"
- Previous message: Niklas Östergren: "Dynamic report (is it possible?)"
- In reply to: Ginger: "Totaling up the hours"
- Next in thread: Ginger: "Totaling up the hours"
- Reply: Ginger: "Totaling up the hours"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|