> Andy Mcshane wrote: > > I am using the standard SQL datetime datatypes, The way I wrote it > above is just to simply demonstrate the way the SQL stores the date. I > handle all of my database > access using stored procedures so I use CFStorerdProc & CFProcParam so > I > what I actually try to pass out to SQL is this, > > no, that's not how sql server stores dates. refer to your BoL. > > > value=#lsdateformat(mydate, "DD MMM YYYY")# > > you've made up your own date format. in i18n work it's ALWAYS a good > rule to use standard date formats (standard as in java style), which > MX > also uses (for de_DE locale): > > "full" Samstag, 13. November 2004 > "long" 13. November 2004 > "medium" 13.11.2004 > "short" 13.11.04 > > these should be understandable to users & easily parsed (and if not, > you > can always blame sun). making up your own date formats requires actual > > locale research & for me, too much programming. and if you're doing > this > w/out doing any locale research, well....
OK, I am getting a little confused now, let me start again. I run a query that returns a date field from SQL, the format of that date is as follows; 2004-12-01 00:00:00.0 - returned from SQL Now when I want to display that date on the page I use the following code; #lsdateformat(MyQuery.MyDate, 'DD MMM YYYY')# This formats the date correctly as '01 Dez 2004' and displays in a text form field which the user can change. The problem occurrs when I try to then manipulate that date field. The date gets formatted as I want it without any error when I format the original date from my SQL query but if I try to do anything else to that formatted date Coldfusion states that it is an invalid date format although I am using exactly the same code i.e. #lsdateformat(MyQuery.MyDate, 'DD.MMM.YYYY')# This where it is confusing as the LSDateFormat works the first time but then reports the date that it just formatted as now invalid! Maybe it's a bug .....? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184252 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

