• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 448
  • Last Modified:

How would you modify a C# statement to display the time in military time - "DateTime.Now.ToString("yyyyMMdd.hhmmss");"?

In the following C# statement, how would you modify it so that the hh (hours) are created in military time?

MyGlobals.BASE_FILE_Name = "C." + DateTime.Now.ToString("yyyyMMdd.hhmmss");
0
zimmer9
Asked:
zimmer9
  • 2
1 Solution
 
plusone3055Commented:
you can create your own from custom Formats as well
http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
0
 
plusone3055Commented:
MyGlobals.BASE_FILE_Name = "C." + DateTime.Now.ToString("yyyyMMdd.HH:mm");
0
 
anarki_jimbelCommented:
"yyyyMMdd.HHmmss" - capital H.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now