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