Format timeofday to 24hour

I am trying to modify this code bit to display the time in military time (24hour)
 
lblClock.Text = TimeOfDay
mickeyshelley1Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Tapan PattanaikConnect With a Mentor Senior EngineerCommented:
Hi mickeyshelley1,

Please check the below link.

12/24 Hour Time format:

http://www.codeproject.com/Tips/206348/Hour-Time-format
0
 
MacroShadowCommented:
lblClock.Text = Format(TimeOfDay, "hh:nn")

Open in new window

0
 
mickeyshelley1Author Commented:
When i run lblClock.Text = Format(TimeOfDay, "hh:nn") i get 02:nn displayed
0
 
MacroShadowCommented:
Sorry, didn't realize it was .Net.
0
 
mickeyshelley1Author Commented:
Solution:  lblClock.Text = Format(DateTime.Now.ToString("HH:mm:ss") & "") ')'
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.