I'm trying to develop a query to return records that have a creation date on Saturday or Sunday only. I've searched the forum but couldn't find anything that addressed how to get these results in SQL. The query I've written does not work:
SELECT formatdatetime(CreateDate,1) as EntryDate, day(createdate) as DayofWeek, month(createdate) as Month, year(createdate) as Year, VoucherNum, GLAcctNum
FROM Corp
Where Day(CreateDate) >5;
I was hoping that the where clause would allow me to pull back just Saturdays and Sundays but it doesnt work.
Any help is appreciated.
SELECT formatdatetime(CreateDate,1) as EntryDate, day(createdate) as DayofWeek, month(createdate) as Month, year(createdate) as Year, VoucherNum, GLAcctNum
FROM Corp
Where Day(CreateDate) >5;
I was hoping that the where clause would allow me to pull back just Saturdays and Sundays but it doesnt work.
Any help is appreciated.