Solved

Format timeofday to 24hour

Posted on 2014-03-30
5
373 Views
Last Modified: 2014-03-30
I am trying to modify this code bit to display the time in military time (24hour)
 
lblClock.Text = TimeOfDay
0
Comment
Question by:mickeyshelley1
  • 2
  • 2
5 Comments
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39965206
lblClock.Text = Format(TimeOfDay, "hh:nn")

Open in new window

0
 
LVL 21

Accepted Solution

by:
Tapan Pattanaik earned 500 total points
ID: 39965229
Hi mickeyshelley1,

Please check the below link.

12/24 Hour Time format:

http://www.codeproject.com/Tips/206348/Hour-Time-format
0
 

Author Comment

by:mickeyshelley1
ID: 39965240
When i run lblClock.Text = Format(TimeOfDay, "hh:nn") i get 02:nn displayed
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39965245
Sorry, didn't realize it was .Net.
0
 

Author Closing Comment

by:mickeyshelley1
ID: 39965257
Solution:  lblClock.Text = Format(DateTime.Now.ToString("HH:mm:ss") & "") ')'
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now