I have a variable as time(7)
, but it gives me values like: '17:25'
. I'd like for it to be in this format: '5:25 PM'
. Is there a way to do this in SQL 2012 without doing something like this:
DECLARE @aux NVARCHAR(8)='16:45:00'
SELECT CONVERT(VARCHAR(15),CAST(@aux AS TIME),100)