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,263 reads

Blogs

How to: Regain SysAdmin Access to a SQL Server Instance Without the SA Password

By

Hello, reader! Today, I’m going to walk you through a scenario that many DBAs...

Secure Your SQL Estate: Best Practices for Azure SQL Security

By

The Castle and the Keys Imagine your Azure SQL environment as a sprawling digital...

The Book of Redgate: Meetings

By

I think we might have forgotten this a bit, but on one of the...

Read the latest Blogs

Forums

Handling Engagement Rings & Wedding Band

By iBling Jewels

I’m working on a jewelry e-commerce project and need advice on designing an efficient...

The Duplicate Cursor

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Duplicate Cursor

Concerns over AI Chat Privacy

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Concerns over AI Chat Privacy

Visit the forum

Question of the Day

The Duplicate Cursor

Can I run this code:

DECLARE ANewTable CURSOR FOR 
SELECT * FROM ANewTable

See possible answers