Somewhere on that server setting the CF locale properly will fix the problem.
If its an existing legacy app as you mentioned, something in the app might be playing with the locale. At least its your code and not SQL so you can fix it. Regards Dale Fraser http://dale.fraser.id.au http://cfmldocs.com <http://cfmldocs.com/> http://learncf.com http://flexcf.com From: cfaussie@googlegroups.com [mailto:cfaus...@googlegroups.com] On Behalf Of Mike Kear Sent: Wednesday, 9 June 2010 2:26 PM To: cfaussie@googlegroups.com Subject: Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005 If I remove the date formatting stuff from the setter, it seems to work ok. But I've been using the Rooibos bean generator without problems for ages. I have never had this problem with dates before. So i'm not sure what's so different about this app. Anyway, if i do this with the setter: <cffunction name="setTransDate" access="public" returntype="void" output="false"> <cfargument name="TransDate" type="date" required="true" /> <cfset variables.instance.TransDate = arguments.TransDate /> </cffunction> then it seems to return a date object that the <CFQUERYPARAM seems to like and inserts the right way round. I guess that's the workaround but i'm a bit nervous about deploying an application where it behaves differently to other applications that work quite successfully. Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month On Wed, Jun 9, 2010 at 2:15 PM, Kym Kovan <dev-li...@mbcomms.net.au> wrote: On 9/06/2010 14:02, Mike Kear wrote: If i set a variable which is a date object using the createdate() function, it reads the date properly. If I use that same function to set a setter in a bean, it doesnt. Here's the specifics: <cfset testdate = createdate("2010","06","10") > <p>Day: #day(testdate)#<br /> Month:#month(testdate)#<br /> Year: #year(testdate)#</p> This code shows year='2010', month='6', day='10' But if i have a bean with a date value in it, and set the date value like this: <cfset PosBean.setTransDate( createdate("2010","06","10") ) /> <p>Day: #day( posbean.getTransDate() )#<br /> Month:#month( posbean.getTransDate() )#<br /> Year: #year( posbean.getTransDate() )#</p> This code shows year='2010', month=10', day='6' So the next bit to check is the typing of the attributes going onto the CFC/bean and return type, etc... -- Yours, Kym Kovan mbcomms.net.au -- You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaus...@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com <mailto:cfaussie%2bunsubscr...@googlegroups.com> . For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en. -- -- You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaus...@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en. -- You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaus...@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.