sql query to 12 hours code example Example: CONVERT time string into 12 hours in sql declare @t time set @t = '14:40' select CONVERT(varchar(15),@t,100)