oh yeah, its a "tdf" a tony defined function, basically a snippet of code that i wrote, and didnt even know that udf's existed :)
man, i really wish i read the books on how to program this cf stuff before i learned how to code ninja cf code!!!! tw -----Original Message----- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 02, 2002 12:21 PM To: CF-Talk Subject: Re: Adding time > I am trying to add a cumulative time variable for a project. > > I have the SQL var type set a timestamp. > > I am getting a time variable in an HH:MM:SS format that I want to add to > the original time and then submit to the database. > > I am getting an error saying that allowed conversions between data types > is not allowed. > > Any help would be great. In all likelyhood, your datasource is seeing a string where it wants a date -- basically, you have to create the date you want before you can updat the table, so you want to get the date from sql server, then on your action page use something like this: <cfset newdate = CreateODBCDateTime("#datepart("yyyy",existingdate)#-#datepa rt("m",existingdate)#-#datepart("d",existingdate)# #form.newtime#")> This is one example, and there may be better ways to handle creating the date, by using CreateDateTime() which takes numbers for year, month, day, hour, minute and second instead of CreateODBCDateTime() which takes a date value and formats it -- in the above example, the date is already odbc formatted with the acception of the "ts {" and "}" on either side of the string, so you shouldn't have any problems with it. In any event, then you can use the variable newdate to update your db. You may actually want to change that column in the db from a timestamp to a datetime data type, since timestamp afaik is supposed to be a unique identifier like an autonumber or a guid, so they may or may not be editable... Isaac Dealey www.turnkey.to 954-776-0046 ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

