Get a list of dates between two dates using a function

前端 未结 21 1442
天涯浪人
天涯浪人 2020-11-22 06:25

My question is similar to this MySQL question, but intended for SQL Server:

Is there a function or a query that will return a list of days between two dates? For exa

21条回答
  •  野的像风
    2020-11-22 07:04

    A few ideas:

    If you need the list dates in order to loop through them, you could have a Start Date and Day Count parameters and do a while loop whilst creating the date and using it?

    Use C# CLR Stored Procedures and write the code in C#

    Do this outside the database in code

提交回复
热议问题