Tuesday, July 24, 2012

Find Current week start Date and End Date in SQL


Introduction:


                  Today I am going to Explain you how to Find Current Week start date and last date of current week.

SELECT DATEADD(wk, DATEDIFF(wk,0,GETDATE()), 0) as 'StartCurrentweek',DATEADD(wk, DATEDIFF(wk,0,GETDATE()), 0)+6 as 'EndCurrentWeek'

The Output is:
StartCurrentweek                  EndCurrentWeek
2012-07-23 00:00:00.000 2012-07-29 00:00:00.000

1 comments:

Anonymous said...

Customize week views in C#.NET

Post a Comment