Richard Just a final comment on this:
If you know that your dates are always in the yyyy/mm/dd format, then you should use parseDateTime() to parse them and then format accordingly: Eg. Assuming your date is in a variable 'd' Format according to the setLocale() value: <cfset dateDisplay = lsDateFormat(parseDateTime(d))> Format explicitly: <cfset dateDisplay = dateFormat(parseDateTime(d),"dd/mm/yyyy")> Regards Kevan -----Original Message----- From: Kevan Stannard [mailto:[EMAIL PROTECTED] Sent: Saturday, 26 January 2008 2:28 PM To: '[email protected]' Subject: RE: date problem Hi Richard We deal with the same issue here in Australia. You may have the problem sorted out by now, but you may like to have a look at some notes I put down a little while ago on this. http://stannard.net.au/blog/index.cfm/2006/10/25/Date-Objects-vs-Date-String s-in-ColdFusion Just an extra comment: When you use lsDateFormat() then CF uses lsParseDateTime() to first convert your string to a date object before formatting. When you use dateFormat() then CF uses parseDateTime() to first convert your string to a date object before formatting. parseDateTime() can handle dates in yyyy/mm/dd format lsParseDateTime() can not handle dates in yyyy/mm/dd format, which is why you get an error. Kevan -----Original Message----- From: Richard White [mailto:[EMAIL PROTECTED] Sent: Monday, 21 January 2008 1:18 AM To: CF-Talk Subject: date problem Hi, i have been playing around with date formats for ages and still encountering problems. i am in the uk and have set the following code when someone logs in: <cfset SetLocale("English (UK)")> i have dates stored in a mysql db which is in the format yyyy/mm/dd when i try to get data out of the db and put it in the dd/mm/yyyy format i use lsdateformat(date,"dd/mm/yyyy") and it spits out an error: 01/20/2008 is not a valid date format!! i dont understand this at all, does anyone have any ideas why it would do this. i dont understand why it would output this when i am telling it to put it in dd/mm/yyyy format not mm/dd/yyyy format thanks very much ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:297512 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

