SQL time conversion

How do you convert time below. The data type is time(0):

09:00:00 to 9:00 AM
22:00:00 to 10:00 PM

Thanks
barnescoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kent DyerIT Security Analyst SeniorCommented:
Outside of the CAST/Convert
http://technet.microsoft.com/en-us/library/ms187928.aspx

You can try the following FORMAT - http://msdn.microsoft.com/en-us/library/hh213505

Here is a real-life example - third response..

[ed. url removed, please see below]


HTH,

Kent
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
barnescoAuthor Commented:
I totally disagree with the above. After 10 years on this site, I honestly don't think I've ever thought of subscribing to another one, until now.

SELECT convert(varchar, 22:00:00), 100) works

I think I was trying to make the value a string when it just needed to stay as a time data type.

Thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.