It might be safer to use an ODBC formatted date.  Depends on the database. Also,
I'm not sure what happens to your 'GT' operator (does CF translate it?), but SQL
usually uses operators like >, >=, <, <=, =, <>.

SELECT *
FROM WebSite
WHERE StartDate > #CreateODBCDate(StartVisit)#


Jim



-----Original Message-----
From: Paige Chandler <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Date: Saturday, January 20, 2001 9:03 PM
Subject: Selecting on dates


>Hi All,
>
>The following function works great for displaying a date, but StartVisit isn't
found when trying to compare it in a Select statement.  I'd really appreciate an
example of the correct syntax to use. TIA.
>
>Regards,
>
>Paige
>
>Select *
>From WebSite
>WHERE StartDate GT #DateFormat(StartVisit,'mm-dd-yy')#


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to