Microsoft KB Archive/62044

{| = Excel DAM: Using Dates in Criteria for SQL Query =
 * width="100%"|

Last reviewed: November 2, 1994

Article ID: Q62044

SUMMARY
To use a date in the criteria range for a DAL (CL/1) query (using the Data Access Macro [DAM]), the date must be enclosed in quotation marks. For example, if you want to find all records in the table &quot;Customer&quot; where the field &quot;cont_date&quot; is greater than 4/13/84, enter the following in the proper cell in the criteria range:

Customer:cont_date >&quot;4/13/84&quot; If quotation marks are not used, the error message &quot;CL1 Error: Operand type clash: integer is incompatible with datetime&quot; will be displayed.
 * }