SELECT SUBSTRING(CONVERT(varchar, getdate(), 100), 13, 2)...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Computer Science Educators

Q&A for those involved in the field of teaching Computer Science

SELECT SUBSTRING(CONVERT(varchar, getdate(), 100), 13, 2) + ':'
+ SUBSTRING(CONVERT(varchar, getdate(), 100), 16, 2) + ' '
+ SUBSTRING(CONVERT(varchar, getdate(), 100), 18, 2) AS MyTime

--SELECT CONVERT(varchar(15),  CAST(GETDATE() AS TIME), 100) as AmPmTime

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results