How to show Time only with AM/PM only in a SQL Query?
sql-server-2008
Solution
Here's one way you can do it:
CONVERT(VARCHAR(8), Timein, 108) + ' ' + RIGHT(CONVERT(VARCHAR(30), Timein, 9), 2)
SQL Fiddle Demo
Problem
I have the following problem, I am using SQL Server MS and below is my result. It looks simple but I cant figure it out. My query: ``` SELECT RIGHT(CONVERT(VARCHAR(26), Timein, 109), 14) from vwSignIn ``` Will give me this as a 9:12:16:597AM I want this 9:12:16 AM as my result. Thanks in Advance.