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!

Date format

Status
Not open for further replies.

stx

Programmer
Sep 24, 2002
62
BE
Hi

I want to display the current time
This is my code:

messagebox.show(now,"hh:mm")

I get for example: 01:30
What i actually want is: 13:30

My computer settings are correct because my windows clock in my statusbar is showing 13:30.

Can anyone help me?
thnx
 
stx,

Try this

Messagebox.show(now,"HH:mm")

-Kris
 
Here's two other options...

MessageBox.Show(Now.TimeOfDay.ToString.Substring(0, _ Now.TimeOfDay.ToString.LastIndexOf(":")))

OR

MessageBox.Show(Now.Hour & ":" & Now.Minute)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top