?
Solved

Format timeofday to 24hour

Posted on 2014-03-30
5
Medium Priority
?
447 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

752 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