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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283546
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4