I am trying to update the DB table using convert(datetime,'19-01-16 11:34:09 PM',5)
, but when I pass this as string to insert into DB table I'm getting the data type conversion error.
Conversion failed when converting date and/or time from character string.
insert into Run (RunID, StartDate)
values ('19012016',"convert(datetime,'19-01-16 11:34:09 PM',5)")