Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166618
---
If you are using oracle, you should definitely use to_date to store
dates. It is probably using a US date format instead of a european.
Another solution is to pass everything as ISO dates yyyy-mm-dd. Most DBs
and apps understand it and you can't mess up months and days.

WHERE startdate <= TO_DATE(<cfqueryparam cfsqltype="cf_sql_varchar"
value="#Dateformat(startdate,'yyyy-mm-dd')#">,'YYYY-MM-DD')

Make sure dateformat returns it in the correct format. If you are using
eauropean dates, you may need to use LSDateFormat().

If startdate is in a specific format like dd/mm/yyyy you can do:
WHERE startdate <= TO_DATE(<cfqueryparam cfsqltype="cf_sql_varchar"
value="#startdate#">,'DD/MM/YYYY')

> -----Original Message-----
> From: Ian Vaughan [mailto:[EMAIL PROTECTED]
> Sent: dinsdag 15 juni 2004 11:01
> To: CF-Talk
> Subject: CF Dates with MX 6.1 ?
>
> Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166617
> ---
> Hi
>  
> Since upgrading to MX 6.1 the following date lines are not
> working, the error returning is
>  
>
> Error Executing Database Query.
>
> [Macromedia][Oracle JDBC Driver][Oracle]ORA-01843: not a valid month
>  
> This is an example of two of the date lines I am using
>  
> <cfset formatted_date1 = dateformat(createodbcdate(startdate),
> "dd/mm/yyyy")>
>  
> ------------------------------------
>  
> WHERE startdate <= #createodbcdate(formatted_date)#
>  
>  
> How do you solve this in CF6.1 by using CFQUERYPARAM ? or the
> to_date function in Oracle ?
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to