Good afternoon, I'm performing a calculation between the date_submitted column and the current date to see how many days have passed. However, I want to exclude Sundays from this calculation, can this be done?
So either if the date_submitted lands on a Sunday I want to say date_submitted+1 or exclude Sundays from the calculation completely, so if the date_submitted = 05/03/2022 (Saturday) and I count the days between that date and today's date, then the answer today will be 1 and tomorrow it will be 2 because Sunday is not being counted.
I hope that makes sense. If anyone could help me with this then that would be appreciated. Thank you.
Select * From gbr_database Where datediff(day,importdate,getdate()) = 0 and campaign = 'GBR TEST' And --DebtorStatus In ('MPP 1st Pay Def Mnth 1', 'MPP High Mnth 1') (datediff(DW,Date_Submitted,getdate()) = 1 or datediff(DW,Date_Submitted,getdate()) = 7 or datediff(DW,Date_Submitted,getdate()) = 14)