Group by Date question (date format is "general")

C

chris

Am grouping various type of Work Hours by Date Worked. Problem is when two
records share same date, for example, but not same time, the result set
returns 2 rows instead of one. How do you group by date regardless of time?
Date format has to be "general", as diffdate on minutes is a necessary
calculation in this particular form. Thanks for any info. -Chris

INSERT INTO LaborMaint2
SELECT DISTINCTROW LaborMaintTemp.[Clock Number] AS [Clock Number],
LaborMaintTemp.Name AS Name, LaborMaintTemp.[Date Worked] AS [Date Worked],
Sum(LaborMaintTemp.[Breakdown Hrs Worked]) AS [Breakdown Hrs Worked],
Sum(LaborMaintTemp.[PM Hrs Worked]) AS [PM Hrs Worked],
Sum(LaborMaintTemp.[Round Hrs Worked]) AS [Round Hrs Worked],
Sum(LaborMaintTemp.[Project Hrs Worked]) AS [Project Hrs Worked],
Sum(LaborMaintTemp.[Total Hrs Worked]) AS [Total Hrs Worked]
FROM LaborMaintTemp
WHERE (((LaborMaintTemp.[Date Worked]) > [Enter last day of PRIOR month as
mm/dd/yy: ]))
GROUP BY LaborMaintTemp.[Date Worked], LaborMaintTemp.[Clock Number],
LaborMaintTemp.Name
ORDER BY LaborMaintTemp.[Clock Number];
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top