Hi,
I have returned to some CF development after a long absence, and am retooling a 
site to use CFCs, and have been a little stumped by a problem I am having.

I have created a Person cfc which, as the name suggests, represents a person. 
After retrieving info from a db, I loop over the recordset and construct a 
Person object for each record. Some of the records have a birthdate, which I 
set using a setBirthDate function. Additionally, there is s getBirthDate 
function to retrieve the value. 

This all works fine, until I tried to apply some formatting. More specifically, 
I tried to use the Year() function, but in all instances the value returned was 
1905. I tried applying a DateFormat of mm/dd/yyyy first (which worked) and then 
using the Year function, but the value was still 1905. I then tried the Right() 
function, and much to my amazement, the value was still 1905. I am using a 
cfscript block inside of the getBirthDate method. I then applied the Right 
function to the actual cfreturn tag (as opposed to in the cfscript block) and 
it worked. I am confused.

So, although I have a workaround, I would like to better understand what is 
happening. Any info appreciated.

JM 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:306005
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to