This is a known bug since CF3 - apparently the bug is a result of using MS
date parsing code in the CF engine.  You can't use the LocaleSpecific
settings to try to force CF to stop swapping month and date for invalid
non-US dates.  One way round this is to specify all non-date formatted dates
into dd-mmm-yyyy date format and do any manipulations with that format.

There are many postings on the subject in Allaire's forums - try searching
on date AND bug AND format.

Hopefully this will be addressed in CF 7 or CF 8 ;)

Keith

> -----Original Message-----
> From: INGECOM - D. Delcomminette [mailto:[EMAIL PROTECTED]]
> Sent: 14 February 2001 14:05
> To: CF-Talk
> Subject: Dateformat behaviour
>
>
> Have a strange behaviour of DateFormat() function. Look at the following
> code and the results below. In my opinion CF could give me an
> error message
> on the second line (invalid date) but certainly not invert the
> day and month
> as it does!
>
> Your comments?
>
> Dominique
>
>
> <cfoutput>
> <TABLE border="1">
>
>   <TR>
>     <TD>Dateformat("01/12/2000","yyyymmdd")</TD>
>     <TD>#Dateformat("01/12/2000","yyyymmdd")#</TD></TR>
>   <TR>
>     <TD>Dateformat("13/12/2000","yyyymmdd")</TD>
>     <TD>#Dateformat("13/12/2000","yyyymmdd")# </TD></TR></TABLE></P>
>
> </CFOUTPUT></P>
>
>
> Dateformat("01/12/2000","yyyymmdd")
> 20000112
> Dateformat("13/12/2000","yyyymmdd")
> 20001213
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to