Scripts

Technical Article

Get FirstDate and LastDate of Every month from two Dates

Get FirstDate and LastDate of Every month from two Dates.

Like IF we have @date1='05/02/2015' and @date2= '11/25/2015' then we will get list of first date and last date from month 5 to 11.

SELECT ID,FirstDate,LastDate,Month,Year FROM [GetFLDatelist](@date1,@date2)

2.4 (5)

You rated this post out of 5. Change rating

2015-11-09 (first published: )

1,264 reads

Blogs

Becoming a creator, my website experience

By

Over the past few months, I have debated starting a new blog to discuss...

T-SQL Tuesday #192 Invitation: SQL Server 2025 Excitement

By

It’s that time of the month again, and once again, I’m late and I’m...

The Book of Redgate: What Our Customers Say

By

This is from 2010, but I loved that people felt this way about Redgate...

Read the latest Blogs

Forums

fast farward curson vs while loop on @table

By rajemessage 14195

hi, need to known weather fast farwand cursor is faster than a while loop...

Economics of AI: What is the Real Cost to Profit?

By dbakevlar

Comments posted to this topic are about the item Economics of AI: What is...

Poor Name Choice

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Poor Name Choice

Visit the forum

Question of the Day

Getting the Indexed Columns

I run this code on SQL Server 2022 to get a list of all the indexes and their key columns. What is returned?

SELECT   
    INDEX_COL (N'AdventureWorks2017.Sales.SalesOrderDetail')

See possible answers