我正在尝试在 MS Access 中执行以下查询以查找两次之间的差异。时间格式例如是开始时间8:00和结束时间14:00。但是我在查询中遇到错误,请帮助我修复它。
PARAMETERS [Enter Date] DateTime;
SELECT
M.CompanyID AS Emp_ID,
MIN(H.EventTime) AS Attending,
MAX(H.EventTime) AS Leaving,
Format( (Leaving-Attending), "hh:mm:ss") AS TotalHrs
FROM
Member AS M
LEFT JOIN History AS H ON M.UserID = H.EventUserID
AND
( Format( [EventDate], "dd/mm/yyyy" ) ) = [Enter Date]
WHERE
companyId NOT IN (select companyid from exceptions)
GROUP BY
M.CompanyID, EventDate
ORDER BY
CompanyId;
啊哈