You can fill it with spaces and colons:
select
stuff(stuff(stuff('20100101000000',9,0,' '),12,0,':'),15,0,':') STR,
convert(datetime,stuff(stuff(stuff('20100101000000',9,0,' '),12,0,':'),15,0,':')) DT;
Result
STR | DT
20100101 00:00:00 | 2010-01-01 00:00:00.000
, , datetime.
select
convert(char(8),getdate(),112) + replace(convert(varchar(30),getdate(),108),':','');
"20100101000000" "getdate()" , .