SELECT replace(replace(replace( convert(varchar(20),GETDATE(),120),’-‘,”),’ ‘,”),’:’,”) AS YYYYMMDDHHMMSS
YYYYMMDDHHMMSS
—————————–
20120110105112
(1 row(s) affected)
SELECT replace(replace(replace( convert(varchar(20),GETDATE(),120),’-‘,”),’ ‘,”),’:’,”) AS YYYYMMDDHHMMSS
YYYYMMDDHHMMSS
—————————–
20120110105112
(1 row(s) affected)