SELECT Day = DATENAME(DW,dutydatetime) -- Wrong function previously used this will get the name , Date = CONVERT(VARCHAR, dutydatetime,103) -- this returns in format dd/mm/yyyy other codes are available ,COUNT(CASE WHEN [type]='Absent' then 1 end ) as [Absent] ,COUNT (CASE WHEN [type]='Present' then 1 end ) as [Present] FROM tblattendancelog GROUP BY DATENAME(DW,dutydatetime) ,CONVERT(VARCHAR, dutydatetime,103) ORDER BY 1,2
i Will Try Daily Base Report For " Get Daily of Day Wise Report
Get Month of Day Wise Report
Get Year Of Day Wise Report