I need to write a SQL Select statement to select all the records where DateCreated falls on a weekend for the last 4 weeks. I know I can do this by hard-coding the select like the one below. But I was wondering if there was an easier way using T-sql date functions.
SELECT * FROM audit_table
WHERE DateCreated BETWEEN '07-31-2010 00:00:00' AND '08-01-2010 23:59:59'
OR DateCreated BETWEEN '07-24-2010 00:00:00' AND '07-25-2010 23:59:59'
OR DateCreated BETWEEN '07-17-2010 00:00:00' AND '07-18-2010 23:59:59'
OR DateCreated BETWEEN '07-10-2010 00:00:00' AND '07-11-2010 23:59:59'