If you look at the <snip>ed error message, the problem is in the CF side not the SQL side.
Try taking out the LSParseDateTime() -- it's getting confused by what is not the locale-specific format of the date. Since you want to put this thing in an nvarchar field, I would probably replace the entire statement with a DateFormat(date, "format") where 'format' is the way I wanted the date to look in the DB. Buyer beware: this advice may very well be worth what you paid for it. --Ben Doom Programmer & General Lackey Moonbow Software : -----Original Message----- : From: Matthew Walker [mailto:[EMAIL PROTECTED]] : Sent: Monday, July 29, 2002 1:04 AM : To: CF-Talk : Subject: RE: Date function : : : You should have the field type in the database as datetime. That might : fix it. : : If not then it's because LSParseDateTime() works on human dates, so you : could bypass it if it fails LSIsDate() maybe?.... : : : > -----Original Message----- : > From: NZERN National Office [mailto:[EMAIL PROTECTED]] : > Sent: Monday, 29 July 2002 3:51 p.m. : > To: CF-Talk : > Subject: Date function : > : > : > The function : > : > ArticleDate = CreateODBCDate(LSParseDateTime(ArticleDate)) : > : > is working well processing a form field with dates. : > : > However when I try an CFinsert to move this date from one : > table to another : > the following error message comes. : > : > the field type is nvarchar : > : > the ISP has SQL 7.0 with CFserver 5.0 : > : > thanks in advance for any clues : > : > Mike Peters : > : > ---------------------------------------------------- : > NZERN National Office : > Mail: PO Box 9000, Christchurch : > (03) 338-5451 : > E-mail: [EMAIL PROTECTED] : > http://www.bush.org.nz : > ---------------------------------------------------- : > : > snip---------------------------------------------------------- : > -------------- : > --- : > : > An error occurred while evaluating the expression: : > : > : > ArticleDate = CreateODBCDate(LSParseDateTime(ArticleDate)) : > : > : > : > Error near line 42, column 8. : > -------------------------------------------------------------- : > -------------- : > ---- : > : > Parameter 1 of function LSParseDateTime which is now "{d : > '2002-07-16'}" must : > be interpretable as a valid date/time value in the current locale : > : > snip---------------------------------------------------------- : > -------------- : > ----- : > : > : > : > : ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists