In a query, how can I compare a sql 7.0 dateTime against an odbc format 
date ? 

In the following query, a cfoutput of dateTimeData looks approx like 
36953.0000 - presumably days/hrs since 01/01/1900 - and i is regular 
odbc format { ts 2001-04-01 00:00:00 }

I've tried various combinations of convert, dateFormat, <cfqueryparam>, 
but have yet to come up with  the right one!

<cfset i=dateAdd('m', -6, Now())>
<cfquery datasource="#request.cfa.objectstore.dsn#" name="qRecent">
     SELECT * FROM properties
     WHERE  (propertyName = 'dateTime')
          AND  (dateTimedata >= '#i#');
</cfquery>

            Thanks In Advance
                    Dave

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to