Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

need time part from datetime column with AM/PM format in SQL 2008

$
0
0

Hi,

I want only time part from a datetime column in SQL 2008.

I also want to achieve the below,

1. I want the format as "hour:minute:second"

2. followed by a space and then AM/PM.

Example,

07:23:45 AM

08:45:59 PM

I tried many format and do RIGHT string conversion, but nothing works for me.

Please give me some solution, thanks


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>