SQL how to exclude bank Holiday and Christmas DAY on Date diff
SQL how to exclude bank Holiday and Christmas DAY on Date diff Any advice will be highly appreciated How to exclude Bank holidays, Christmas DAY in date datediff in the UK I have a customer table with all the customer booking in a hotel, I would like to calculate the length of stay but I want to exclude bank holidays and other holidays in the UK. Many thanks SELECT [StartDate], DATEDIFF(DAY,[StartDate],[EndDate]) AS Bookingdays ,[EndDate] ,[CustomerId] ,[BookingID] FROM [CustomerBooking] Search for Calendar Table. – Dan Guzman Jun 30 at 10:51 Elaborating Dan Guzman's comment: (1) create Calendar Table. (2) mark the unique days in the Calendar Table. (3) select the dates from the Calendar Table which are between the [StartDate] and [EndDate] and that the column for unique days is not i...