DECLARE @SAMPLEDATE VARCHAR(10) DECLARE @FORMATTEDTIME VARCHAR(10) SET @SAMPLEDATE = CONVERT(VARCHAR(8),GETDATE(),108) SET @FORMATTEDTIME = REPLACE(@SAMPLEDATE ,':',''); PRINT @FORMATTEDTIME
SELECT REPLACE(CONVERT(VARCHAR(8),GETDATE(),108),':','') AS HMS
SELECT replace(CONVERT(VARCHAR(8),GETDATE(),108),':','') AS HourMinuteSecond
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)