CF and MySQL will always attempt first to parse a date per the locale 
info, IIRC.  In CF, you can use setlocale() to change this on the fly, 
and then use parsedatetime() and dateformat() to manipulate the dates.

I generally try to always use a yyyymmdd format when possible and format 
on output.  This is, IMHO, simpler than dealing with locales and odd 
formatting.  It also makes sorting easy.  However, it may not be a 
viable answer for you.

--Ben

Mark Flewellen wrote:
> I am having trouble with Date Formats on a Windows Server, running CFMX7 
> and mysql,
> 
> I am wanting to have dates appear in a European Format ie. dd/mm/yyyy 
> and once posted from a form for them to be saved in the MySQL Database 
> in an American Format (which it does by default).
> 
> However I am finding that if I post a date such as 10/12/2005 (ie. 10 
> December 2005), this will save in the database as 2005-10-12 (ie. 12 
> October 2005),
> 
> but
> 
> if I save a date such as 18/12/2005 (ie. 18 December 2005), this saves 
> in the database in the correct format ie. 2005-12-18
> 
> It seems whenever the day value is below 13 it seems to swap the day and 
> the month around.
> 
> Anyone got any ideas?
> 
> Mark
> 
> 
> 
>               
> ___________________________________________________________ 
> NEW Yahoo! Cars - sell your car and browse thousands of new and used cars 
> online! http://uk.cars.yahoo.com/
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230375
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to