A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Adding times



 
 
Thread Tools Display Modes
  #1  
Old August 10th, 2007, 03:30 PM posted to microsoft.public.access.reports
SHIPP
external usenet poster
 
Posts: 50
Default Adding times

I have a beginning time and an ending time. I am using the following in the
query of the report to print out the detail.

Format([StartTime] -1 -[EndTime], "Short Time") This works fine.

Now I want to group by employee and sum the times. I have tried:

=Format(Sum([DateBegin]-1-[DateEnd]),"Short Time")
=sum([Full Time])

[Full Time] is the field name in the query.

Both give me Data Type Mismatch. Any ideas?
--
M. Shipp
  #2  
Old August 10th, 2007, 05:26 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Adding times

If you are looking for durations of time, you are better off calculating using
MinutesDuration: DateDiff("n", [StartTime],[EndTime])
This creates a numeric value which can be summed.

Using Format(...,"Short Time") converts your times to a string which can't
be summed.

--
Duane Hookom
Microsoft Access MVP


"SHIPP" wrote:

I have a beginning time and an ending time. I am using the following in the
query of the report to print out the detail.

Format([StartTime] -1 -[EndTime], "Short Time") This works fine.

Now I want to group by employee and sum the times. I have tried:

=Format(Sum([DateBegin]-1-[DateEnd]),"Short Time")
=sum([Full Time])

[Full Time] is the field name in the query.

Both give me Data Type Mismatch. Any ideas?
--
M. Shipp

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:14 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.