Copy link to clipboard
Copied
As the subject declares, I have a search form with various search parameters, including a start data and end date. On the results page, when I run the recordset against the table that contains the dates it works fine whether or not there are actually dates entered into the fields. The SQL is using a >= operator for the start date and a <= for the end date. I set the default values for a very early date in the past, and the distant date in the future.
The problem comes in when I run a recordset against a Query/View in MSSQL and it tests fine. But when I run the query in Dreamweaver, the only records it returns are ones that actually contain data in those fields. I'm not sure why this is, but the first thing I'm looking at are the default values for these dates - is there something I can use to indicate "all dates" even though the fields may sometimes contain null values? The % sign doesn't' work. Any ideas?
Using classic ASP with VBscript. Thanks!
Copy link to clipboard
Copied
Just thought I'd post an update as I got this sorted out.
As I thought, there is no "All" option when it comes to dates. I had made a silly error and was actually trying to sort on the wrong date fields.