MS Access query, how to use SQL to group single dates into weeks

前端 未结 2 753
长情又很酷
长情又很酷 2021-01-28 06:15

I currently have two tables. One has Employee Names and a number associated to that name.

The other date has time sheet date with columns for the employee number, the d

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-28 06:46

    You can try getting the week with datepart function like

    SELECT DATEPART(ww, 'your date') AS week;
    

    and then group by week.

    Here more info https://www.w3schools.com/sql/func_sqlserver_datepart.asp

提交回复
热议问题