Dear All,
I am using this query to calculate Total items completed within a date range and then the AHT and SLA for those items, how can i get the query to remove 1440 mins from the total if the date range contains a Sunday.
Hope this is of use, Rob.![[yoda] [yoda] [yoda]](/data/assets/smilies/yoda.gif)
I am using this query to calculate Total items completed within a date range and then the AHT and SLA for those items, how can i get the query to remove 1440 mins from the total if the date range contains a Sunday.
Code:
SELECT tblMailItems.UniqueID, tblMailItems.ItemType, tblItemTypes.ItemAHT, tblItemTypes.ItemSLA, tblMailItems.CaseStatus, tblMailItems.DateLogged, tblMailItems.DateClosed, DateDiff("n",[datelogged],[dateclosed]) AS AHTITems, IIf(DateDiff("n",[datelogged],[dateclosed])<[itemSLA],100,0) AS Totals
FROM tblItemTypes INNER JOIN tblMailItems ON tblItemTypes.ItemType = tblMailItems.ItemType
WHERE (((tblMailItems.CaseStatus)="Closed"));
Hope this is of use, Rob.
![[yoda] [yoda] [yoda]](/data/assets/smilies/yoda.gif)