Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Format timeofday to 24hour

Posted on 2014-03-30
5
Medium Priority
?
482 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

597 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