James, my feeling is you're not creating a date object in the CFC.
You really should keep your formatting for the display side. so in
your CFC you should be using:
CreateDate("yyyy", "mm", "dd")
which creates a date object which you can store or manipulate in various ways.
Then when you come to display it in the browser, thats when you use
the dateformat function to ensure it's using the correct format for
your application.
[hobbyhorse mode ON]
Can i suggest when you display your date, you use dateformat(
birthdate, "mmm/dd/yyyy") so the month is displayed as a three letter
abbreviation. That removes the confusion caused by the fact that the
whole world except North America displays dates as day/month/year.
With a lot of sites, you can never be sure whether a date 6/7/2008 is
in July or June.
[/hobbyhorse mode OFF]
Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month
On Sun, May 25, 2008 at 4:09 AM, James Milks <[EMAIL PROTECTED]> wrote:
>>Can we see the code that invokes these CFCs? The problem might lie there as
>>well.
>>
>>----------------------------------
>>Can we see the code that invokes these CFCs? The problem might lie there as
>>well.
>>
>>----------------------------------
> Right. Sorry about that. I have omitted the query & loop code, but be aware
> that it is a vanilla SQL statement and the birth_date column is a datetime
> datatype on SQL Server.
>
>
> <cfscript>
> tmpPlayer = CreateObject("component", "cfcs.Person").init();
> tmpPlayer.setPersonId(qPlayers.person_id);
> tmpPlayer.setFirstName(qPlayers.first_name);
> tmpPlayer.setCommonName(qPlayers.common_name);
> tmpPlayer.setLastName(qPlayers.last_name);
> if(birth_date neq "" and IsDate(birth_date)){
> tmpPlayer.setBirthDate(qPlayers.birth_date);
> }
> ....
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306018
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4