EasyCFM.COM ColdFusion Forums / MS Access Related Issues / CF, french dates and MS Access

   Reply to Discussion | New Discussion next >> 
Posted By Discussion Topic: CF, french dates and MS Access

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

taiseux
06-12-2013 @ 10:22 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Member
Posts:
Joined: Jun 2013

Hi,

I have a problem inserting dates in a MS Access database. Days and month are swapped everytime the date stay valid
Ex: 05 of june 2013 become six of may 2013 but 13th of june is not changed.

I use #CreateODBCDate(Dateformat(mydate,"dd/mm/yyyy"))#

Of course i put in my Application.cfm :
<cfset Locale=setLocale("French (standard)")>

Windows 2003 server and CF8.

Sorry for my terrible english and thanks in advance.


Jean-Jacques

taiseux
06-17-2013 @ 5:32 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Member
Posts:
Joined: Jun 2013

Hi,

Someone gave me the answer so i post-it here if somebody has the same problem :

<cfset variable.MyDate=#ParseDateTime(form.myFormDate)#>

and for insertion in the db :

<cfqueryparam value=#variables.dateObject# cfsqltype="cf_sql_date">

and no more false interpretation with dates with day under 13.

Jean-Jacques.

Jean-Jacques


Website Designed and Developed by Pablo Varando.