I have a database table that accepts dates in this format: `5/15/2017`
Now, when I query the table with:

```
SELECT *
FROM table
WHERE 1 = 1

```

There is form field which contains a date for filtering the query. The field value will always be in this format: e.g Today = `5/15/2017 - 5/15/2017`,
 lastmonth = `4/1/2017 - 4/31/2017`. The `form.date` consists of two dates separated by the `-` The month, day, and year.

Now I want to add a condition to the query. If the form is defined, filter it by date. So it will be like this:

```
<cfquery datasource="xx" name="ys">
    SELECT *
    FROM table
    WHERE 1 = 1
    <cfif isdefined ("form.date") and form.date neq "">
    AND date = '#form.date#'
    </cfif>
</cfquery>

```

I know the statement inside the `cfif` is wrong, but how can I make the date search for the rows inside the database that span through the `form.date` value?