When you type date in the format of 'xxxxxx' it seems that SQLServer assumess it is an ISO format yymmdd and as such it is not affected by the SET DATEFORMAT
I was aware of 2 such formats - so called safe formats
- ISO: yyyymmdd
- ISO8601:yyyy-mm-ddThh:mi:ss.mmm
but it seems that yymmdd is also ISO - check BOL Date and Time Styles - format 12
That would explain why the solution posted by Scorpio did not work
You can use the solution provided by butterchicken with the format specification (12) to be on a safe side:
declare @dt varchar(6)
select @dt = '010109'
select convert(datetime,RIGHT(@dt,2) + SUBSTRING(@dt,3,2) + LEFT(@dt,2),12)
If possible I would be ideal if you could change the column to datetime to avoids similar surprises in the future