select GETDATE()
------------------------------------
2012-11-07 16:54:06.470
select substring(CONVERT(varchar(100), GETDATE(), 112),3,6)
--or
select replace(CONVERT(varchar(100), GETDATE(), 2),'.','')
---------
121107
Other functions
datepart datename
datediff