Since all records now and from here on out will be post 2000, I assumed I would be able to insert a "20" into the current record and then be able to convert it to a date.
For example:
"03/15/11" could be split into "03/15/" + "20" + "11" and recombined to get 03/15/2011 (which is a readable date).
My attempted code was:
INSERT INTO TRIAL (SOLD_DATE) SELECT CONVERT(VARCHAR(10),(SUBSTRING(FIRST_SOLD,1,6)+'20'+SUBSTRING(FIRST_SOLD,7,2)),1) FROM LABELS
However, it returns this error:
Msg 241, Level 16, State 1, Line 4
Conversion failed when converting date and/or time from character string.
Any suggestions?


Sign In
Create Account


Back to top









