I am using MS access 2010.
I need to get the InTime and OutTime between the timing 5am today till 5am tomorrow. Because some employee will come by today morning,say,10:00 am and may leave the office by next day morning 2:00 am. so I need to calculate his/her intime and outtime.
The query used is:
SELECT DateValue(Trans.Dt) AS DateOfAttendance, Format(Min(Trans.Dt) ,"MM/dd/yyyy HH:mm:ss") AS InTime, Format(Max(Trans.Dt),"MM/dd/yyyy HH:mm:ss") AS OutTime, EmpID FROM Trans WHERE (DateValue(Trans.Dt)=date()) GROUP BY DateValue(Trans.Dt),Trans.EmpID;
Thanks in Advance!!!