Sql – Get Time from Getdate()

sqlsql servertimetsql

I would like to take the Getdate() results of,

for example

2011-10-05 11:26:55.000

into

11:26:55 AM

I have looked other places and found

Select RIGHT(CONVERT(VARCHAR, GETDATE(), 100),7)

which gives me

11:26AM

It's so close I can taste it!

Best Answer

select convert(varchar(10), GETDATE(), 108)

returned 17:36:56 when I ran it a few moments ago.