I am using SQL Server 2014. I have the following query:
Use MyDatabase
select *
from Table1
where [CreatedOn] between '2019-01-01' and '2019-12-31'
I need to filter by [CreatedOn]
so that it excludes all Saturdays and Sundays between the specified dates.
What would be the correct syntax to perform this operation?