CONVERT(TIME,GETDATE()) AS HourMinute gives result as 17:23To format time in SQL Server 2005 and before you can use
CAST( LEFT(exampletime, LEN(exampletime)-2) + ':' + RIGHT(exampletime, 2) AS VARCHAR(5) )
CONVERT(TIME,GETDATE()) AS HourMinute gives result as 17:23To format time in SQL Server 2005 and before you can use
CAST( LEFT(exampletime, LEN(exampletime)-2) + ':' + RIGHT(exampletime, 2) AS VARCHAR(5) )
0 comments:
Post a Comment