Richard, When you insert dates into your database, you should be using cfqueryparam, which, when you specify the cfsqltype is cf_sql_date, will do the date format conversion for you.
I think the trick is to think of it more like it's a date object that you format only for output, and is otherwise left in whatever format the database gave it to you. Anyways, I recommend using query params in place of date formatting for queries, including odbc date formatting. -- nathan strutz http://www.dopefly.com/ On Dec 17, 2007 8:39 AM, Richard White <[EMAIL PROTECTED]> wrote: > Hi, > > in the past we have had intimidated problems with the dateformat function > and mysql > > therefore we want to use the setlocale() method to change to english UK. > > i am a little confused as our mysql wants dates to be in the format of > yyyy/mm/dd > and of course when we get the date out of the database we need it in the > format dd/mm/yyyy > > therefore does this mean that i should setlocale() to english UK. then > when i am getting a date out of the database i use: lsdateformat(date, > 'dd/mm/yyyy') > then when saving to the database i need to use > lsdateformat(date,'yyyy/mm/dd')? > > if i am write on this can i set the locale in the application.cfm page as > we dont have access to the cf administrator on our server? is so could you > please give an example and i cant find how to do it? and would it matter > that our server is a host in the US - would it override their locale? > > then like i said do i always have to use the lsdateformat instead of > dateformat > > thanks > > richard > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294925 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

