I am running SQL Server 2005. Technically I know how to take the time from a tsql datetime.
CONVERT(VARCHAR(8),GETDATE(),108) AS HourMinuteSecond
The functions you want is DatePart
Declare @d DateTime Select @d = GetDate() Select (DatePart(HOUR, @d) * 3600) + (DatePart(MINUTE, @d) * 60) + DatePart(SECOND, @d)