NextPrevUpTopContentsIndex Working with date fields

To use date fields via Common SQL, compare values by formatting the date as a string, in a date format that the database can parse. For example:

(sql:select * :from [Table] :where [= [Date] "25-Dec-2005"])

It is not possible to lookup date values in the database using numeric values. because

  1. Common SQL cannot know that the field will be a date field until the results are returned, and
  2. the database probably does not know about Common Lisp universal time.

LispWorks User Guide - 8 Apr 2005