Hi Jim,

I've used 'GT' in other Select statements successfully - but I'm not married
to it. The problem is that the field in the table is in the Date/Time format
(mmddyyhhmm) Hence I was trying to use the
#DateFormat(StartVisit,'mm-dd-yy')# to extract the portion of just the date
for the comparison. It works for display but I can't find any examples of
using hoe to use it, or something better, for comparison. Thanks.

Regards,

Paige
----- Original Message -----
From: "Jim McAtee" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Saturday, January 20, 2001 11:13 PM
Subject: Re: Selecting on dates


> 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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to