Sproc to get First Day of the Month,First Weekday ETC

First Day of the Month, First Weekday, Total Days in this Month, Days In First WeeK, Days In Last Week,Total Weekend Days sample output: Given Date:Jul 16 2005 12:00AM First Day of the Month:7/1/2005 First Weekday (sun=1,sat=7):6 Total Days in this Month:31 Days In First Week:2 Days In Last Week:1 Total Weekend Days:10

2005-07-15 (first published: )

201 reads

Blogs

Join me at SQLBits 2020

By

The SQLBits conference is taking place in London again this year, between March 31st...

DBA, a job, a vital job

By

DBA, a job, a vital job. T-SQL a language that is fun. Select, a...

SOS_SCHEDULER_YIELD – What is it really telling us?

By

I decided to write this off the back of a conversation I was having...

Read the latest Blogs

Forums

Question up greading

By itmasterw 60042

Hi, I see the post of going from 2012 - 2019 but we were...

Constraint on multiple columns

By SIJCOOKE

Hi, I want to restrict users from adding duplicate rows. Is there a way...

Table self-join for derived columns

By pwalter83

Hi, I have a requirement to derive additional columns and populate the values by...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers