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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert TimeString to 12 hour format

Status
Not open for further replies.

Netman06

Technical User
Aug 15, 2006
70
US
Hello,

How can I use the TimeString to convert the system time, to 12 hour format and not 24 hour format Military time.

I have a fuction on my form that returns the current system time.

Label1.Text = TimeString, but it return 17:37:52

I would like this to return 5:37:52 or just 5:37

if you have any idea how I can do this that would be great.

Thanks,

Mike
 
Format(Date.Now, "t")

will return "5:37 PM"

________________________________________________________
Zameer Abdulla
Help to find Missing people
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top