That reminds me!

On Jun 9, 11:48 am, "m...@ampersand.net.au" <m...@ampersand.net.au>
wrote:
> Is the code in the CFC doing anything obviously wrong (like formatting the 
> date)?

We did have a problem recently because we were doing THIS;

In the CFC - format the date ie.

<cfscript>
    objectdatefield = #dateformat(theformfield, "YYYY-MM-DD")#;
    // so now I have the fourth of July : 2009-07-04
</cfscript>

And then we formatted the date a second time in the SQL
<cfquery ...>
    UPDATE ....
    SET
        databasedatecolumn = #dateformat(objectdatefield, "YYYY-MM-
DD")#;
</cfquery>

So despite using the same format in both dateformat instructions - we
ended up persisting the 2009-04-07.

Removing the datefrmatting from within the object and leaving it in
the SQL (which has become part of our design standard  - corrected the
issue.

Gavin.

-- 
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