Good ol' military time
To continue on my posts about
extend existing classes
(I have been doing these a lot at my new job), here is a simple extension to make
DateTime.ToMilitaryString() to output a military time such as:
21 DEC 08 : 16:22:34 - it's very simple actually:
public static string ToMilitaryString(this
DateTime dt)
{
string time = dt.ToString("dd
MMM yy : hh:mm:ss");
return time.Substring(0,12)
+ dt.Hour + time.Substring(14,6);
}