try using the dateformat in your <cfset>
<cfset date1=DateFormat("02/08/2004", "dd/mm/yyyy")>
<cfset date2=DateFormat("12/08/2004", "dd/mm/yyyy")>
<cfoutput>
date1 is #DateFormat(date1, 'dd/mm/yyyy')# - #DateFormat(date1, 'dd mmm
yyyy')#<br>
date2 is #DateFormat(date2, 'dd/mm/yyyy')# - #DateFormat(date2, 'dd mmm
yyyy')#<br>
</cfoutput>
This will make date1 and date2 actual dates rather than a normal string to CF.
Doing this tells CF that this is a date and what parts are what.
----- Original Message -----
From: Paul Wilson
To: CF-Talk
Sent: Tuesday, August 24, 2004 7:59 PM
Subject: Date format issues
I am trying to format two dates but I'm getting the days and months
swapped around.
e.g.
<cfset date1="02/08/2004"> 2nd August 2004 (in Australia)
<cfset date2="12/08/2004"> 12th August 2004 (In Australia)
<cfoutput>
date1 is #DateFormat(date1, 'dd/mm/yyyy')# - #DateFormat(date1, 'dd mmm
yyyy')#<br>
date2 is #DateFormat(date2, 'dd/mm/yyyy')# - #DateFormat(date2, 'dd mmm
yyyy')#<br>
</cfoutput>
This gives...
date1 is 08/02/2004 - 08 Feb 2004
date2 is 08/12/2004 - 08 Dec 2004
Is there away of using the dd/mm/yy date format instead of US version. I
don't want to have to parse the date string and use createdate.
Thanks
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

