Not to beat a dead horse, but just FYI - CreateODBCDateTime() is not needed
if you are using a CFQUERYPARAM because CF will automatically convert
whatever value you give it to a valid date (if it's possible to convert) so
whether you do any of the following, you get the same result:

<cfqueryparam cfsqltype="CF_SQL_DATE" VALUE="#now()#">
<cfqueryparam cfsqltype="CF_SQL_DATE" VALUE="#createODBCDateTime(now())#">
<cfqueryparam cfsqltype="CF_SQL_DATE" VALUE="05/22/2007">

And to my knowledge, now() returns an ODBC Date Time stamp anyway.....you
would use that function to do something like this:

#createODBCDateTime("5/22/07 4:14 PM")#

And .02 more - I also use getDate() for SQL Server, if I'm certain the db
will remain SQL Server (if it is standardized) and whether or not you use
the CF App Server time (now()) or the db server time (getdate()), just be
consistent throughout your app.  

Dave
-----Original Message-----
From: Coldfusion [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 23, 2007 6:40 PM
To: CF-Talk
Subject: RE: Inserting current date into a data table


I tend to agree unless you are developing an application that the database
platform may vary. 
Then I would use the 

<CFQUERYPARAM CFSQLTYPE="CF_SQL_TIMESTAMP"
VALUE="#CreateODBCDateTime(Now())#">




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

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