摘要: 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... 阅读全文
posted @ 2015-12-18 10:54 finly 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2015-12-18 09:08 finly 阅读(185) 评论(0) 推荐(0) 编辑