I'm trying to insert using vba into a table on sql server, it gives an error:
"Conversion failed when converting date and/or time from character string."
querytxt = "update TABLE set dateplan=N'" & Sh.Cells(cl.Row, Range("Table [Date Planned]").Column) & "'" & _
" where ID='" & Sh.Cells(cl.Row, Range("Table[ID]").Column) & "'"
I understand the problem, but I don’t fully understand what function / conversion I should use and where to make it work in code. thanks in advance!