I don't know if this will help but here is my SQL.
SELECT dbo_VP_EMPCUREARNTIME.PERSONFULLNAME,
dbo_VP_EMPCUREARNTIME.PERSONNUM, dbo_VP_EMPCUREARNTIME.EVENTDATE,
Sum(dbo_VP_EMPCUREARNTIME.TIMEINSECONDS) AS SumOfTIMEINSECONDS,
dbo_VP_EMPCUREARNTIME.LABORLEVELNAME3, dbo_VP_EMPCUREARNTIME.LABORLEVELNAME4,
Sum((([TIMEINSECONDS]+900)/3600)-8) AS Hours
FROM dbo_VP_EMPCUREARNTIME
GROUP BY dbo_VP_EMPCUREARNTIME.PERSONFULLNAME,
dbo_VP_EMPCUREARNTIME.PERSONNUM, dbo_VP_EMPCUREARNTIME.EVENTDATE,
dbo_VP_EMPCUREARNTIME.LABORLEVELNAME3, dbo_VP_EMPCUREARNTIME.LABORLEVELNAME4
HAVING (((dbo_VP_EMPCUREARNTIME.EVENTDATE) Between [Beginnig Date] And
[Ending Date]) AND ((Sum(dbo_VP_EMPCUREARNTIME.TIMEINSECONDS))>27900) AND
((dbo_VP_EMPCUREARNTIME.LABORLEVELNAME4)="mc"))
ORDER BY dbo_VP_EMPCUREARNTIME.PERSONFULLNAME;
Duane Hookom said:
I'm having trouble seeing some values for TimeInSeconds.
--
Duane Hookom
Microsoft Access MVP
Richardb said:
When I put the -8 my results are always a negetive number. The results
should be a positive. Results end up being -7 0r -8 and so on. should be 1,
2 or some number in the positive.
Duane Hookom said:
Ok, so I don't see anything wrong with the exression. What do you mean by "my
results are not coming out right"? We can't see your data or your results or
what you expect.
--
Duane Hookom
Microsoft Access MVP
:
Yes, I am calculating overtime. I am adding 15 minutes because where I am
pulling the seconds does not have 15 min. that is added to the employees
hours. I am pulling the people with hours worked over 8 adding the 15 min
than need to subtract the regular 8 hours.
Richard
:
Why are you subtracting 8 hours? Why are you adding 15 minutes? What options
are you looking for? Are you attempting to calculate over-time in a day?
--
Duane Hookom
Microsoft Access MVP
:
With this expression my results are not coming out right. I am converting
seconds into hours. If i do not put in the -8 hours it is correct. Should I
use the calculation with the minus 8 hours in seconds first. What options do
I have?
Hours: (([TIMEINSECONDS]+900)/3600)-8
Any help would be appreciated.
Richard