Hi guys, trying to make a timeclock like query to show the time between first & last record per day, the table is called RTETABLE, has fields DateTime which is: "12/02/03 10:44:25" & Prim which is a numeric identifier for staff.
Here is the query I'm working on, but i'm lost.
SELECT Format(Max(right(trim([DateTime]),8))-Min(right(trim([DateTime),8)]),"hh:nn") AS Elapsed, Format(left(trim([DateTime]),8),"dd-mm-yy") AS [Day], [RTETABLE].[Prim]
FROM [RTETABLE]
GROUP BY Format([Time],"dd-mm-yyyy"), [RTETABLE].[Prim];
Any help greatly appreciated.
Regards,
John R.
Here is the query I'm working on, but i'm lost.
SELECT Format(Max(right(trim([DateTime]),8))-Min(right(trim([DateTime),8)]),"hh:nn") AS Elapsed, Format(left(trim([DateTime]),8),"dd-mm-yy") AS [Day], [RTETABLE].[Prim]
FROM [RTETABLE]
GROUP BY Format([Time],"dd-mm-yyyy"), [RTETABLE].[Prim];
Any help greatly appreciated.
Regards,
John R.