yes, I will have to strip the time portion off. 

As I say, it was unexpected. To me it looks like the cfqueryparam tag changes 
the behaviour of the CreateODBCDate function somehow.



>>> Haikal Saadh <[EMAIL PROTECTED]> 20/06/2007 10:38 am >>>

That's odd...

But do the query results seem to be taking the time portion into account?

If it does, I guess you can always pass in 0:00 as the time?

Scott Thornton wrote:
> Actually,
>
> I just tested using <cfqueryparam cfsqltype="cf_sql_date" 
> value="#CreateODBCDate('01/jan/2007 23:02')#"> and the debug out showed the 
> time portion still being passed as well as the date.
>
>
>
>   
>>>> Haikal Saadh <[EMAIL PROTECTED]> 20/06/2007 10:24 am >>>
>>>>         
>
> I don't think it's strange... a date is not a timestamp. If you want to 
> use a date you should use CF_SQL_DATE.
>
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to