Can be achieved in one sentence:
Declare @a int
set @a=20 1 10320
select convert(datetime,cast(@a as varchar(8)),2 1)