Daily Archives: August 5, 2013

Important Date Function In Sql Server 2008

Here are the some of important date function which i have worked out last week in order to write some Sp’s for my project. Start and End of Today SELECT DATEADD(DD,DATEDIFF(DD,0, GETDATE()),0) as [Start Of Day] DATEADD(s,-1,DATEADD(dd, DATEDIFF(dd,0,GETDATE())+1,0)) as [End Of Day] Start and End of Week SELECT DATEADD(WK, DATEDIFF(WK,0,GETDATE()),0) as [Start Of Week] DATEADD(s,-1,DATEADD(WK, […]