While this question is better suited for another forum, you are saying that
(keeping it simple) if you did:

<cfset display_from = "07/04/2001">
<cfset display_from = dateformat(display_from, "mm/dd/yyyy")>
<cfoutput>
        #display_from#
</cfoutput>

that you would get:

04/07/2001

?  Should not be possible with the information you have provided.  Just
tested it to be sure, but there is nothing all that unusual or complex about
what you say you are doing.  Guess we need more information.  Do you enter
the date as straight text in a text input on a form or are using a custom
tag of some sort to help validate data?  Need more data.

On the database issues, it would be helpful to know what database because if
its Access, I have found CreateODBCDate to provide incorrect results.  If
you want to keep this off fusebox mailing, e-mail me direct if you would
like.

Mike Craig
[EMAIL PROTECTED]
FuseboxWorld

-----Original Message-----
From: Tim Price [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 07, 2001 4:17 AM
To: Fusebox
Subject: Date fields


Could anyone shed any light onto why after entering a date of "07/04/2001"
(dd/mm/yyyy format)the following <cfset
display_from=#dateformat(display_from,"dd/mm/yyyy")#>
switches it to "04/07/2001" (this is only used to redisplay it if the form
is redisplayed follwoing validation failure on any form field)

...... unless that is I enter a day > 12 and then it retains its original
input "13/04/2001"

I also find that if I insert the field into the database without using
CreateODBCDate it retains its orginal format but WITH CreateODBCDate it
switches the dd/mm parts round if the dd is < 13

Thanx in advance

Tim Price
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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