Re: Date/Time Average??



Since diff2dates is returning a string, you can't use average on it.

Try averaging the difference in minutes (using DateDiff), and format that
into hh:mm.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"bladelock" <bladelock@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:14DDF1F8-1A29-4D03-8288-303A3BB72CC3@xxxxxxxxxxxxxxxx
>I have a report that works well, BUT, I have one problem. How do I get an
> average of the date and times on the report footer
>
> I'm using diff2dates on the report which works well:
> =diff2dates("hn",CDate([bed Dte] & " " & [bed time]),CDate([rec Dte] & " "
> &
> [rec Time]))
>
> Displays:
> 23 minutes
> 1 hour 23 minutes
> etc.....
>
> But When I put this code on the report footer, it doesn't work. I want to
> average this data on the report footer
>
> =Avg(diff2dates("hn",CDate([bed Dte] & " " & [bed time]),CDate([rec Dte] &
> "
> " & [rec Time])))
>
>
> This doesn't work?? Can some one help, I need to


.



Relevant Pages

  • Re: Date/Time Average??
    ... >> Doug Steele, Microsoft Access MVP ... >> (no e-mails, please!) ... >>> average of the date and times on the report footer ...
    (microsoft.public.access.reports)
  • Totaling up the hours
    ... This will format the timedifferencefield into a normal ... number and allow sum and multiplication operations to be ... My formula for Time Difference on the query is ... >>In the report footer ...
    (microsoft.public.access.reports)
  • Re: DCount problem
    ... The only thing I can think of is to put square brackets around the table ... Doug Steele, Microsoft Access MVP ... I've also tried to put it under report footer but ...
    (microsoft.public.access.formscoding)
  • Re: I thought I COULD sum fields from my data source?
    ... CSOUSA wrote: ... Now all I want to do in my report footer is =Sum. ... Also, when you format a value, the result is a text string, ... MVP ...
    (microsoft.public.access.reports)
  • read page number or group in report footer
    ... I just wonder that can I read page number on format or print event? ... in to pages or I can add a dummy group to group them together on the ... The text box in the report footer that I am not sure that I ...
    (microsoft.public.access.reports)