Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Date of current week's Monday

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-08-27 : 11:13:25
Eng writes "Dependiong on whatever date/day today is, how do I figure out what date was the Monday falls on for the current week?

TIA"

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2002-08-27 : 11:40:42
DATEADD(day, @dow-DATEPART(dw, GETDATE()), DATEADD(day, DATEDIFF(day, 0, GETDATE()), 0))

@dow is the day number returned by DATEPART(dw) for the day you want. If @@DATEFIRST = 7, then @dow = 2 for Monday.


Go to Top of Page
   

- Advertisement -