View Full Version : Filter by date (need help)

11-02-2011, 10:09 AM

I am working on a school project, and I am making a website which observes weather. I am saving each "observation" in my database. I am listing all observations up on a page, and I want the user to have the ability to filter them by date.

At the moment I got this code: SELECT *
FROM observations
WHERE (date BETWEEN @StartDate AND @EndDate )

How do I make a form of some sort that specifies "@StartDate" and @EndDate"? All help will be appreciated.