Thanks Matt! 
This seems to work on the coldfusion side:
<cffunction name="getDate" access="remote" returntype="string" output="false">
        <cfargument name="myDate" type="string">
        <cfquery name="queryDate" datasource="MASEnews">
        SELECT newsdate FROM news
        </cfquery>
        <cfset myDate = dateFormat(queryDate.newsdate, "mmmm dd, yyyy")>
        <cfreturn myDate>
        </cffunction>

Now if I can only get it to work in flash!


>Using DateFormat() in your query as you have it performs the SQL
>dateFormat() function.  You'll need to change it with
>#dateFormat(productDetailQuery.newsdate, "mmmm dd, yyyy")# after the query
>has run to do it in CF.
>
>Oh, and yes, Ben posts here as well :-)
> 
>
>-----Original Message-----
>From: Cathy Coggin [mailto:[EMAIL PROTECTED] 
>Sent: Wednesday, September 27, 2006 11:42 PM
>To: CF-Talk
>Subject: dateFormat
>
>Wow! Ray Camden posts here... next you'll tell me Ben Forta does too.
>I am in the process of reading their excellent book on Coldfusion MX7 and
>was surprised to see his post today.
>
>I have a bit of a problem that is causing major hair loss and was wondering
>if someone might help me with it.
>Please help me save some hair!
>
>I am trying to do a bit of flash remoting using flash 8 and coldfusion mx7.
>Here's the problem. The newsdate record of my database displays in flash as:
>Fri Jan 20 00:00:00 GMT-0600 2006
>when I want it to display as just plain ole Jan 20, 2006. I was trying to
>accomplish the change with actionscript when someone on the actionscript
>forum at chattyleaf suggested I try to change the format in my cfc.
>
>Here's the cfc:
>    <cffunction name="getProductsDetails" access="remote" returnType="query"
>output="true">
>    <cfargument name="newsID" type="numeric">
>    <cfquery name="productDetailQuery" datasource="MASEnews">
>    SELECT * FROM news WHERE newsID = #newsID#
>    </cfquery>
> <cfreturn productDetailQuery >
>    </cffunction>
>
>I tried to change it to
>SELECT DateFormat(newsdate,'mmmm dd, yyyy'), title, article, newsId FROM
>news but that didn't work
>
>As you can see I haven't read *enough* of their excellent book yet!
>Anyone have any ideas?
>thanks in advance!
>Camden-Forta Fan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:254682
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