List all Dates between two dates in SQL Server

In this post, I demonstrate one small script to find all dates between two dates in SQL Server.
Today, Morning one database developer came to my desk and ask about this query.
I have created a small script for him so here I am also sharing this script which will help to other.

I am using WITH statement to find a list of all dates between two dates.


Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.

If you like this post, then please share it with others.
Please follow, I will share my experience towards the success of Database Research and Development Activity.

I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.

More from

Leave a Reply

6 Comments on "List all Dates between two dates in SQL Server"

Notify of
Sort by:   newest | oldest | most voted

Thank you for sharing with us, I think this website really stands out : D.

Elliot Luersen

wonderful points altogether, you simply received a brand new reader. What would you recommend in regards to your put up that you just made a few days ago? Any positive?


One of the best blog…. Thanks for this information


It is working for me, Anvesh thank you!


this is working for me, thank you!


easy and clean, thank you