We help IT Professionals succeed at work.
Get Started

Searching using the current date and last seven days.

ccskellett asked
Last Modified: 2010-03-19
Earlier I ask a question on how to retrieve data from a database using the current date. I now have the solution which was:
FROM Table
WHERE posted = convert(char(10), getdate(),111)

However I now want to search for items that are between the current date and the date 7 or 14 days before the current date as well. Can anyone figure this one out for me?
Watch Question
This problem has been solved!
Unlock 1 Answer and 7 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE