How to get Saturday’s Date. I have today’s date with me.
GETDATE()
How to do this.
For eg. TODAY is 08-08-2011
I want output as 08-13-2011
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is a function that will return the next Saturday if you call it like this:
The “6” comes from the list of possible values you can set for
DATEFIRST.You can get any other day of the week by changing the second parameter accordingly.
This is the function:
[EDIT]
This might be another solution. This should work in any language: