I think he is working with dates
You're right, I didn't notice the CFMX form of the function.
--
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.
You can try using data object instead of a string formatted as a date. I
think the column in your query is of type string.
Bye
Gualtiero
- Original Message -
From: Mark Lewis [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Monday, July 30, 2007 1:43 PM
Subject: Query of
Date is possibly(probably) a reserved word? Even if it isn't, your test
will fail when the year rolls over - you should test /mm/dd. And I
think you might need apostrophes around today's formatted date?
None of this is guaranteed, I am famous for being wrong.
-Original Message-
Not too sure about this, but have you tried it with GT
maybe also try changing the filed name from date to tripDate - in case it is
a reserved word
On 7/30/07, Mark Lewis [EMAIL PROTECTED] wrote:
Hi,
Wondered if someone could advise on this problem I am having.
I have created a query as
Mark,
I think the problem is the date column. Date is a reserved word, I
think, and must be wrapped in []. Also, I would use a query param as it
takes care of the data type conversion.
cfquery name=search dbtype=query
SELECT *
FROM event
WHERE [date] cfqueryparam
Gualtiero and Dave thanks for your help I have resolved the issue with both
your tips.
Thank you for your time again
Mark
Date is possibly(probably) a reserved word? Even if it isn't, your test
will fail when the year rolls over - you should test /mm/dd. And I
think you might need
Oh sorry, I only just got everyone else's responses through, thank you to
you guys for your time too.
Much appreciated,
Mark
~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
I think you need quotes around your date in the comparison in the SQL.
But I always have trouble with QoQ syntax for some reason.
--Ben Doom
Mark Lewis wrote:
Hi,
Wondered if someone could advise on this problem I am having.
I have created a query as shown below...
cfset event =
I would like to run a query on this query where it finds only the
records where the date is greater than today.
You cannot compare dates if they are stored in American format.
Use QuerySetCell(event, date, 2007/07/28, 1) Instead: always with mask
/mm/dd
Then
WHERE date
and yes, since you are actually working with strings, not dates, you
do need quotes in
WHERE date '#DateFormat(Now(),/mm/dd)#'
--
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to
Schneegans [mailto:[EMAIL PROTECTED]
Sent: Monday, July 30, 2007 10:48 AM
To: CF-Talk
Subject: Re: Query of Queries date comparison
. and yes, since you are actually working with strings, not dates,
you do need quotes in WHERE date '#DateFormat(Now(),/mm/dd
11 matches
Mail list logo