What do the methods setTransDate() and getTransDate() look like? Is
there a declared property behind them? If so, what does that look
like?

On Tue, Jun 8, 2010 at 9:02 PM, Mike Kear <afpwebwo...@gmail.com> wrote:
> I have found i can specifically set a date using numerical values rather
> than variables, to make absolutely certain i know what the value of the date
> being inserted is.
> If i set a variable which is a date object using the createdate() function,
>  it reads the date properly.  If I use that same function to set a setter in
> a bean,  it doesnt.     Here's the specifics:
> <cfset testdate = createdate("2010","06","10") >
> <p>Day: #day(testdate)#<br />
> Month:#month(testdate)#<br />
> Year: #year(testdate)#</p>
> This code shows year='2010', month='6', day='10'
> But if i have a bean with a date value in it,  and set the date value like
> this:
> <cfset PosBean.setTransDate( createdate("2010","06","10")  ) />
> <p>Day: #day( posbean.getTransDate() )#<br />
> Month:#month(  posbean.getTransDate() )#<br />
> Year: #year( posbean.getTransDate() )#</p>
> This code shows year='2010', month=10', day='6'
> If i use the bean value in the insert statement, it inserts the date with
> month=10 and date=6.  If i use the #testdate# value in the insert statement,
>  it inserts the date with month=6 and date=10.
> The conclusion i am coming to is that a cfc will behave differently to a cfm
> file.     No??   Anyway, since the value i'm trying to insert into the
> database is a value from the bean (along with all the other values of the
> bean)  I'm always going to get the wrong value into the database aren't i?

-- 
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.

Reply via email to