Your problem is somewhere else; this code works fine on CF 7 and CF 8:

<cfset xdate = "May 21, 2008">
<cfset cdate = "#ParseDatetime(xdate)#">
<cfoutput>#DateFormat(cdate,"dd/mm/yyyy")#</cfoutput>

On Thu, Jun 19, 2008 at 10:20 AM, Rick Sanders <[EMAIL PROTECTED]> wrote:
> Hello James,
>
> I certainly did and the error I get is: May 21, 2008 is an invalid date or
> time string
>
> My code:
> <cfset myDoc=XMLParse(XMLResult)>
> <cfset xdate = "#ToString(myDoc.michiganMasons.event_begin_date[1])#">
> <cfset cdate = "#ParseDatetime(xdate)#">
>
> Rick
>
> -----Original Message-----
> From: James Holmes [mailto:[EMAIL PROTECTED]
> Sent: June-18-08 10:36 PM
> To: CF-Talk
> Subject: Re: Date parsing and formatting...
>
> Di you try ParseDateTime() ?
>
> On Thu, Jun 19, 2008 at 9:26 AM, Rick Sanders <[EMAIL PROTECTED]> wrote:
>> OK, here's the scoop...
>>
>>
>>
>> I'm grabbing the date from an XML web service which is returning the date
> in
>> the following format: May 21, 2008
>>
>> How can I change it to 05/21/2008 ?
>>
>>
>>
>> Naturally I had to parse it to a string because Cold fusion won't parse an
>> XML child node.
>>
>> I've tried dateformat, CreateDate, LSParseDateTime and they all return
>> errors telling me that "May 21, 2008 is an invalid date format".
>
> --
> mxAjax / CFAjax docs and other useful articles:
> http://www.bifrost.com.au/blog/
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307698
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to