At 11:43 PM 11/21/2004, you wrote: >hi - i can't seem to find a definitive naswer on this one. I have a MSSQL >( MSDE ) tbale with a field set to type timestamp. > >How on earth do I get coldfusion to insert a current datetimestamp into >this field ????? > >I have tried: > ><cfquery datasource="scripts" name="insDTS"> >INSERT INTO tblFeeds (dteFeedDate,strFilename) VALUES ( >#CreateODBCDateTime(Now())#, 'stuff') ></cfquery> > >Should I be using a timestamp field or a date time field ????
DateTime is probably more appropriate. You can either set the default for the field to be getdate() and not include it in the insert statement or specify it explicitly like: INSERT INTO tblFeeds (dteFeedDate, strFilename) VALUES (getdate(), 'stuff') ; -- Phillip Beazley Onvix -- Website Hosting, Development & E-commerce Visit http://www.onvix.com/ or call 727-578-9600. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184973 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

