Thanks, but I think I should explain this a little better...

Col002 is a text (varchar in SQL) field imported from a log file which displays a date 
such as 04/04/03. 
I need to compare this field, 04/04/03, using the dateformat command which gives me 
the current numeric(?) date. Using the examples below I get a blank screen with no 
errors but no date comparison.

Robert O.

-----Original Message-----
From: Ben Doom [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 4:21 PM
To: CF-Talk
Subject: RE: compare 


I think you just need more quotes:

<cfquery name="getsomedata" datasource="application_log">
select * from application2
where col002 = '#dateformat(now(), "MM/DD/YY")#'
</cfquery>


--  Ben Doom
    Programmer & General Lackey
    Moonbow Software, Inc

: -----Original Message-----
: From: Robert Orlini [mailto:[EMAIL PROTECTED]
: Sent: Thursday, April 03, 2003 4:08 PM
: To: CF-Talk
: Subject: compare
:
:
: I'm using an SQL table and comparing a date column which was
: imported from a log file. The date is setup as a varchar not a
: number. I would it so that the varchar date in the column can be
: compared with the current date (which of course is a number)
: using dateformat.
:
: The code I have is:
:
: <cfquery name="getsomedata" datasource="application_log">
: select * from application2
: where col002 = #dateformat(now(),'MM/DD/YY')#
: </cfquery>
:
: This of course does not work. What can I code in the "where
: col002" section that compares the varchar date (which is written
: 04/03/03) with the current date using the CF dateformat command?
:
: Thanks!
:
: Robert O.
: HWW
:
: 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to