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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|