Click here to Skip to main content
15,881,380 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
DateTime datatype is date.

got error of conversion failed varchar value to int.


What I have tried:

tried this qupdate query :
Update Tabl Set Id1=@id1,Id2=@id2,Id3=@id3 where Year(DateTime) = 'Year(Now())'"
Posted
Updated 8-May-20 0:55am
v2

1 solution

Try to remove single quotes!
SQL
Update Tabl Set Id1=@id1,Id2=@id2,Id3=@id3 where Year(DateTime) = Year(Now())
 
Share this answer
 
Comments
phil.o 8-May-20 7:10am    
5'd :)
Patrice T 8-May-20 7:15am    
Thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900