D
dwaynesworld
I have a query which will caculate the number of work hours based on weekdays
only.
SELECT tblEmployeeData.Name, Sum(Nz([SumOfHours Taken],0)) AS [Hours Taken],
DateDiff("d",([forms]![ParamForm]![StartDate]),([forms]![ParamForm]![EndDate]))+1 AS [Total Days], qryEmployeeTimeOff.StartDate, qryEmployeeTimeOff.EndDate
FROM tblEmployeeData LEFT JOIN qryEmployeeTimeOff ON tblEmployeeData.Name =
qryEmployeeTimeOff.Instructor
WHERE (((tblEmployeeData.Name) Not Like "*Guest*" And (tblEmployeeData.Name)
Not Like "*Self*"))
GROUP BY tblEmployeeData.Name, qryEmployeeTimeOff.StartDate,
qryEmployeeTimeOff.EndDate;
The problem seems to be that in Jan, it does not calculate the number of
week days correctly. Please help.
only.
SELECT tblEmployeeData.Name, Sum(Nz([SumOfHours Taken],0)) AS [Hours Taken],
DateDiff("d",([forms]![ParamForm]![StartDate]),([forms]![ParamForm]![EndDate]))+1 AS [Total Days], qryEmployeeTimeOff.StartDate, qryEmployeeTimeOff.EndDate
FROM tblEmployeeData LEFT JOIN qryEmployeeTimeOff ON tblEmployeeData.Name =
qryEmployeeTimeOff.Instructor
WHERE (((tblEmployeeData.Name) Not Like "*Guest*" And (tblEmployeeData.Name)
Not Like "*Self*"))
GROUP BY tblEmployeeData.Name, qryEmployeeTimeOff.StartDate,
qryEmployeeTimeOff.EndDate;
The problem seems to be that in Jan, it does not calculate the number of
week days correctly. Please help.