Hi Scott, Here are a couple of possible workarounds if you don't find what your'e after.
WHERE year(sb_accom_start_date) = #datePart("yyyy",myDate)# AND month(sb_accom_start_date) = #datePart("m",myDate)# AND day(sb_accom_start_date) = #datePart("d",myDate)# WHERE sb_accom_start_date BETWEEN #CreateODBCDate('01/jan/2007 00:00:00')# AND #CreateODBCDate('02/jan/2007 00:00:00')# Cheers, Adam PS: (mssql) Scott Thornton wrote: > Hi, > > I had a bit of an unexpected problem whilst using the above today. > > Problem is my time looks like '01/jan/2007 23:02' but I want to only use the date portion. > > So in a query I use: > > <cfquery datasource="#dsn#"> > select > * > from > sb_hospital > where > sb_accom_start_date > #CreateODBCDate('01/jan/2007 23:02')# > </cfquery> > > which when runs, the date looks like '01/jan/2007' to the query. > > However > > <cfquery datasource="#dsn#"> > select > * > from > sb_hospital > where > sb_accom_start_date > <cfqueryparam cfsqltype="cf_sql_timestamp" value="#CreateODBCDate('01/jan/2007 23:02')#"> > </cfquery> > > passes the full date with the time on it. > > Seems a bit strange to me. Not what I was expecting at all. > > CF MX 6.1. > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---