I used to #createodbcdate# function as shown below which has worked great.

WHERE expiry_date = #createodbcdate(DateFormat(now(), "DD-MMM-YY"))#

Cheers

Will

----- Original Message -----
From: "James Smith" <[EMAIL PROTECTED]>
Newsgroups: cf-talk
Sent: Sunday, October 01, 2000 2:28 PM
Subject: Re: Date fields in SQL


> Shouldn't you use <cfset today = DateFormat(now(), "DD-MMM-YY")> and also
I
> think ID is a reserved word in access, try using AdvertID instead (or
> something similar).
>
> --
> James Smith
> [EMAIL PROTECTED]
>
> ----- Original Message -----
> From: "W Luke" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Sunday, October 01, 2000 2:24 PM
> Subject: Date fields in SQL
>
>
> > Hi,
> >
> > Well it's another Query problem for Will today - the error message is
> > telling me it can't find expiry_date field - in Access I've set the
> > date/time format to a custom dd-mmm-yy - is this the problem?  Here's
the
> > code:
> >
> > <Cfset today = #DateFormat(Now())#>
> >
> > <cfquery name="adverts" datasource=#ds#>
> >  SELECT id FROM advert_details
> >  WHERE expiry_date = #today#
> > </cfquery>
> >
> > ODBC Error Code = 07001 (Wrong number of parameters)
> >
> >
> > [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
1.
> >
> >
> >
> > Any ideas?
> >
> > Thanks, again all.
> >
> >
> >
> > Will
> >
> >
>
> --------------------------------------------------------------------------
> ----
> > Archives: http://www.mail-archive.com/[email protected]/
> > To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
> the body.
>
> --------------------------------------------------------------------------
----
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

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

Reply via email to