Friday, January 23, 2009

Time Only

declare @date DateTime

set @date = GETDATE()

SELECT LEFT(CONVERT(VARCHAR(8), @date, 8), 5) AS TimeOnly

/*
TimeOnly
--------
15:04
*/

No comments: