Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting 24 hr time to 12 hr time

Status
Not open for further replies.

Dross

Programmer
Aug 16, 2001
212
US
I have a stored procedure that brings back a time in 24 hour format. I need to convert it to a 12 hour format to show am or pm. I can't find anything in the help that will work. Any ideas?
 
Currently, it's 1:11 PM, EDT...
The code below executes, and str will have '1:11 PM'...


Dim tTime As DateTime = Now
Dim str As String = tTime.ToShortTimeString


Is this sufficient??

JK
 
Worked like a dream!! Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top