Hello Guys, I've never been in the habit of using CreateODBCDateTime() in the past but after reading a few times that it's the recommended route to go when entering values into the database I thought I'd give it a shot, however its causing a few issues and so thought I'd come and clear up how this is best applied.
I'm running SQL Server 2k5 and on my create and update methods I write the current date and time to a couple of columns, using the following method: DateCreated = <cfqueryparam value="#now()#" cfsqltype="cf_sql_timestamp" /> This has always worked nicely and I've never really had any reason to believe that it wouldn't, however, like I say, after reading about the createODBCDateTime() method I thought I'd give that a shot if it's considered to be a better practice. DateCreated = <cfqueryparam value="#createODBCDateTime(now())#" cfsqltype="cf_sql_timestamp" /> However this only enters the date into the database, and the time portion is left to sit as 00:00:00. Can anyone explain why this is? And perhaps elaborate a little on when and where I should be using the createODBCDateTime() method and where I should not? Thanks for your time guys, this seems like a bit of a silly question to ask but thought I'd get your thoughts on it. Rob ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291184 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4