Al
DateTime always stores "time" in 24 hour (military time) format. It just
varies how you display it.
As Scott suggests you can use a custom format to change how time is
displayed & parsed.
Const militaryTimeFormat As String = "HH:mm"
' convert to a string in military time
Dim input As String = DateTime.Now.ToString(militaryTimeFormat)
' convert from a string in military time
Dim time As DateTime = DateTime.ParseExact(input,
militaryTimeFormat, Nothing)
For details on custom datetime formats see:
http://msdn.microsoft.com/library/de...matstrings.asp
For information on formatting in .NET in general see:
http://msdn.microsoft.com/library/de...ttingtypes.asp
Hope this helps
Jay
"Al" <Al@discussions.microsoft.com> wrote in message
news:74**********************************@microsof t.com...
Hi
Is it a function to convert time to and from military time?
Thanks