摘要:
To get thefirst day of the previous monthin SQL Server, use the following code:SELECT DATEADD(mm, DATEDIFF(mm, 0, GETDATE()) - 1, 0)To get thelast day... 阅读全文
摘要:
To get thefirst day of the previous weekin SQL Server, use the following code:SELECT DATEADD(wk,DATEDIFF(wk,7,GETDATE()),0)To get thelast day of the p... 阅读全文