Another way is to add '-' (hyphens) , which turns the date into a USA format date (style 10)
'081709' becomes '08-17-09'
then convert that to a varchar using ISO datetime format (style 112)
declare @mmddyy char(6)
set @mmddyy = '081709'
select
convert(
varchar,
convert(datetime, substring(@mmddyy,1,2) + '-' + substring(@mmddyy,3,2) + '-' + substring(@mmddyy,5,2),10),
112)
returns
20090817
Kev