time formate conversion to am pam

Aug 8 2013 2:34 PM
Hello can any one help me to retrieve value from database saved in datetime format to HTML5 input type time control.

I tried to use
select REPLACE(REPLACE(CONVERT(varchar, CAST('1900-01-01 23:28:00' AS time) ,100),'AM',' AM'),'PM',' PM')
but it gives error
Type time is not a defined system type.
I want output as
11:28:00 PM

Answers (3)