Business Days calculation

前端 未结 3 1153
悲哀的现实
悲哀的现实 2020-12-22 01:11

I have a query where I am calculating total days between two days including start and end date by the following SQL query. If the end date is not null, then end date is cons

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-22 01:59

    Take a look at the DATEDIFF MSDN page. At the bottom of the page, there is some user-generated content.
    One user posted a function there which does exactly what you want, including holidays (headline: "UDF to return the number of business days, including a check to a bank holidays table").

提交回复
热议问题