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

How to convert a datetime to a string with time in am/pm with leading zeros

$
0
0

I thought I was pretty familair with convert and format but I can't seem to find a way to convert a date time field to a string field in the following format:

04/30/2013 03:31:00 PM

I can get really close, but I can't seem to find a way to get the leading zeros on the time.

Any ideas?


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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