Weekend
how to exclude weekend(Friday) in sql statement i trade use select datediff(WK,date1,date2) but not working even i chose (Dialect mssQL)
Thank You
Discussion (1)0
Comments
https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=RSQL_datepart
Not sure what your definition of a weekend is, this will exclude Sunday and Saturday...
SELECT *
FROM your_table
WHERE DATEPART('dw', date1) NOT IN (1, 7)Just Friday...
SELECT *
FROM your_table
WHERE DATEPART('dw', date1) <> 6