trying to get all the dates from the db that are within the current week
i have email1DueDate, email2DueDate, email3DueDate
and i want to see if they are due to be sent within the current week
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.
First you should calculate two DateTime values for the start of the week and the end of the week, you can do that like this (assuming Monday is the first day):
next you can use this in your LINQ query to get the results you need, I am assuming you want results to be rows that have any of your due dates fall in the week:
If this is not what you need then you will need to clarify your requirements