Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

To Find the First Saturday of any month

By Jack,

This is the code snippet for finding first saturday of any month.

Datefirst property provides the base for finding the any first day (monday to sunday) of the month.

Depending on this property ,you can find the remaining first day of any month (monday to sunday) by changing the value starting from (1 to 7).according to datefirst value,it is very easy to find the first day of any month.

 

Total article views: 1338 | Views in the last 30 days: 4
 
Related Articles
FORUM

How to get the first day of any month

To get the first day of any month

FORUM

Wanting first data from within a month...

Selecting Records where you want the first record from a month to join to a larger list of records

SCRIPT

t-sql first last day date of the month

Returns the First or last day date of the month for a given date.

FORUM

Modify date to first day of week,month,quarter

getting the first day of a given period

FORUM

get the first Sunday and last Saturday

how to get the first Sunday and last Saturday of a month

Tags
 
Contribute