标签:sele add com 当前时间 ted sql select href pst
当前时间周的起始日期(以周一为例)select DATEADD(week,DATEDIFF(week,0,getdate()),0)
上周起始:select dateadd(week,-1,DATEADD(week,DATEDIFF(week,0,getdate()),0))
上上周起始:select dateadd(week,-2,DATEADD(week,DATEDIFF(week,0,getdate()),0))
上上上周起始:select dateadd(week,-3,DATEADD(week,DATEDIFF(week,0,getdate()),0))
周七以此类推
sql如何通过当前日期获取上周,上上周,上上上周的起始日期(周一_周七)
标签:sele add com 当前时间 ted sql select href pst
原文地址:http://www.cnblogs.com/amylis_chen/p/7726214.html