Willy,

Depending on what database you are using then this may not work.

The general syntax is correct, but you need to use #CreateODBCDate(date1)#
instead '#dateformat(date1,"mm/dd/yy")#'.  Note the lack of single quotes.
ODBC dates should not be delimited as a string.

Regards

Stephen

> -----Original Message-----
> From: Anthony Geoghegan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 09 November 2000 11:36
> To: CF-Talk
> Subject: RE: date comparisons
>
>
> Hi Willy,
>
> SELECT * FROM table
> WHERE datefield >= '#dateformat(date1,"mm/dd/yy")#'
> AND datefield <= '#dateformat(date2,"mm/dd/yy")#'
>
> Pulls all data from table between date1 and date2 (inclusive).
> I found the Books Online SQL refernece an excellent Reference.
> I can't say I've ever used a tuorial for it though.
> Regards,
> Anthony Geoghegan.
> Lead Developer,
> What's On Where (WOW!)
> http://www.wow.ie
> mailto:[EMAIL PROTECTED]
> ------------------------------------------------------------------
> ------------------------------
> Archives: http://www.mail-archive.com/[email protected]/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
> or send a message with 'unsubscribe' in the body to
> [EMAIL PROTECTED]
>

------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to