Link to home
Start Free TrialLog in
Avatar of W.E.B
W.E.B

asked on

Every other Saturday date

Hello,
Can you please help,
I have a stored procedure that fires some emails to my clients.
Currently it runs twice a month.
if DATEPART(day,getdate()) in (6,21)  
Begin xxxxxxxxxxx

I need to change the date to make it run every other Saturday. (Starting  January 6th, 2018)
Jan 6th, Jan 20th, Feb 3rd, and so on.

Any help is greatly appreciated.
SQL2008

W
ASKER CERTIFIED SOLUTION
Avatar of Snarf0001
Snarf0001
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of W.E.B
W.E.B

ASKER

Thank you very much.
Good solution - well done snarf0001
Can you explain the use of the % as an operator in this statement?

I was not aware the it could be used as anything other than a wildcard in a search.
Dale, see if this helps, it's the modulo operator, and works like +, -, / arithmetic operators, but returning the remainder of a division...



»bp