Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 SQL Server 2008 获取六个星期日的星期数。例如,我有 2012 年 11 月,日期 18,11 月 18 日的 WeekNo 是“47”。
试试这个:
SELECT DATEPART(week,'18-nov-2012')