Date for Monday and Friday of Current Week

Date for Monday and Friday of Current Week

The Date for Monday and Friday of the current week can be determined as illustrated below.

SELECT GETDATE() + (2 – DATEPART(WEEKDAY, GETDATE())) AS MONDAY,GETDATE() + (6 – DATEPART(WEEKDAY, GETDATE())) AS FRIDAY

This assumes that you consider the first day of the week to be a Sunday and that the last day of the week is a Saturday.  If this is not the case you will need to use the SET DATEFIRST to set the first day of the week to a number from 1 through 7.  ie. SET DATEFIRST 1 to set MONDAY.  To determine the day that is currently set as the first day of the week run SELECT @@DATEFIRST (by default this is 7 which is Sunday).

Skill up with our training courses

Are you looking to skill up on the latest version of Microsoft SQL Server or get started with Power BI? We’ve got you covered. We offer the most comprehensive range of Microsoft Data Platform and Data Analytics training courses available.

Browse Courses