Date field not working

Ive a date field with a calendar look up, but once i select my two dates it still returns everything
anyone know how to fix this problem?


<td><label for="datefrom">Date From:</label> 
      <input type="input" name="DateFrom" id="DateFrom" size="11" readonly="readonly" /> <cf_cal target="DateFrom" formname="search"></td>
      
      <td><label for="dateto">Date To:</label>
      <input type="input" name="DateTo" id="DateTo" size="11" readonly="readonly" /> <cf_cal target="DateTo" formname="search"></td>

Im pulling the date from a query and using


AND I.INVOICE_DateAdded >= '#form.DateFrom#'
 AND I.INVOICE_DateAdded <= '#form.DateTo#'

Is INVOICE_DateAdded a date/time column?

Turn on debugging and look at the generated sql. It’s probably not what you think it is.

You still need to turn on debugging and look at the generated sql to see what is happening :wink:

yes its a Timestamp, automatically populating with the date and time for every record added.

you MAY not need the quotes around a timestamp. I think i’ve run into that issue before.

True. That usually applies to date objects though. Since they’re using a form field, I think it’s just a simple string.

(I really wish they’d help us out and post the generated sql though :wink: