Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with a trigger results

Status
Not open for further replies.

strtech

Technical User
Oct 30, 2006
27
US
I created a trigger on a table that moves any changes and deletions to the main table to a historical table. The problem is that I keep getting an error "conversion failed when converting datetime from character string". I used the convert function on the date fields and I'm still getting the error message.

Example:
Select EnrollmentDate, Convert(varchar(13), EnrollmentDate, 101) FROM Inserted

Am I using the convert function incorrectly?
 
I would suggest that the data contains some things that cannot be converted to dates. Also why are you sending the data twice? Once as enrollment date and once converted?


Questions about posting. See faq183-874
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top