SQL Server, Convert Military to Standard Time

Here is my current SQL:

SELECT (startDate + ' From ' + startTime+ ' To ' + endTime) AS FullTime, dateTimeKey
FROM DatesTimes
WHERE DatesTimes.reservationKey = 79

startTime and endTime are being stored in the database as Strings.  The hold time values in hh:mm military format.  I would like to pull these values from the database and store them in FullTime but having a standard time format rather than military  (with AM or PM showing).

I tried this, but it didn't work:

SELECT convert(startTime, 108) AS Starting, convert(endTime, 108) AS Ending,
(startDate + ' From ' + Starting + ' To ' + Ending) AS FullTime, dateTimeKey
FROM DatesTimes
WHERE DatesTimes.reservationKey = 79

Any help would be most appreciated.
rreisterAsked:
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.

muzzy2003Commented:
The first line will pull the start and end times out as genuine date time values. You can't then references these directly though, so the second line might be all you really want. Haven't tested it, so if it's not quite right let me know and I'll tweak.

SELECT CONVERT(datetime, startDate + ' ' + startTime) AS Starting, CONVERT(datetime, startDate + ' ' + endTime) AS Ending,
startDate + ' From ' + RIGHT(CONVERT(varchar(20), CONVERT(datetime, startTime), 0), 7) + ' To ' + RIGHT(CONVERT(varchar(20), CONVERT(datetime, endTime), 0), 7) AS FullTime, dateTimeKey
FROM DatesTimes
WHERE DatesTimes.reservationKey = 79
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
rreisterAuthor Commented:
It worked perfectly!  Thanks so much for quick and easy reply!
0
muzzy2003Commented:
You're welcome
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
Databases

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.