Your CFQUERYPARAM type is 'date', which represents a date.  If you
want to represent a timestamp/datetime, you use the 'timestamp' type.
It's not a MySQL issue, it's a JDBC issue - you're telling the driver
it's a date, so it's ignoring the time portion before handing it off
to the database.

cheers,
barneyb

On 7/12/07, Tom King <[EMAIL PROTECTED]> wrote:
> Hi all,
> this is driving me nuts:
>
> I'm trying to insert a date/time into a mysql database:
>
> the row is set up as datetime, NULL as default;
>
> I;m trying to insert from a form where I have drop downs which give
> me the various values;
>
> The values are definitely being passed from the form to the CFC;
> the time stamp I'm passing in is valid, and the DATE always changes,
> but the Time value is always inserted at 00:00:00
>
>
> <cfscript>
>         //Create Valid Date Time Objects
>         ThisStartDate=CreateDateTime(year(form.EventStart),
> month(form.EventStart), day(form.EventStart), form.starthour,
> form.startmin,
> 00);
>         ThisEndDate=CreateDateTime(year(form.EventEnd),
> month(form.EventEnd), day(form.EventEnd), form.Endhour, form.Endmin,
> 00);
> </cfscript>
>
> This is the SQL:
>
> UPDATE tblEvents
>                 SET
>                 EVENTNAME = <cfqueryparam value="#form.EventName#"
> cfsqltype="cf_sql_varchar">,
>                 EVENTSTART = <cfqueryparam value="#ThisStartDate#"
> cfsqltype="cf_sql_date">,
>                 EVENTEND = <cfqueryparam value="#ThisEndDate#"
> cfsqltype="cf_sql_date">,
>                 WHERE EventID = <cfqueryparam value="#form.eventid#"
> cfsqltype="cf_sql_integer">;
>
>
> Help???
>
>
> Thanks
>
>
> T

-- 
Barney Boisvert
[EMAIL PROTECTED]
http://www.barneyb.com/

Got Gmail? I have 100 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

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