SQL
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,2i Will Try Daily Base Report For " Get Daily of Day Wise Report
Get Month of Day Wise Report
Get Year Of Day Wise Report

Amit MohantyRank #112 · 20K reputationPosted Sep 1, 2022, 9:37 AM EDT
shah MominRank #6,924 · 253 reputationPosted Sep 1, 2022, 4:03 PM EDT
Amit MohantyRank #112 · 20K reputationPosted Sep 2, 2022, 12:39 AM EDT