Doug Brown wrote:
> what is the correct datetime format for mySql? I get an error on insert
>
> Error Executing Database Query.
> Incorrect datetime value: '09/09/2006 05:39 PM' for column 'join_date'
> at row 1
IT sounds like you're inserting a string, which you shouldn't be doing.
Make sure your date in coldfusion is a date object and then you can do
insert into sometable
(datefield)
values
(<cfqueryparam cfsqltype="cf_sql_timestamp" value="#yourdate#">);
Or, if you totally hate cfqueryparam (god help you)...
insert into sometable
(datefield)
values
(#createODBCDateTime(yourdate)#);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252689
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4