Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Military Time
Message
De
02/04/2004 13:55:41
 
 
À
02/04/2004 13:28:28
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00891836
Message ID:
00891850
Vues:
17
I would still like to know if there is a .NET conversion/representation method for this, but for those interested, I have implemented the following method to convert a DateTime structure time portion to a military string representation:
/*************************************************************/
private string ConvertToMilitaryTimeString(DateTime dtDateTime)
/*************************************************************/
{
	return (dtDateTime.Hour.ToString().PadLeft(2, '0') + ":" +
		dtDateTime.Minute.ToString().PadLeft(2, '0') + ":" +
		dtDateTime.Second.ToString().PadLeft(2, '0'));
}
>Is there a method or function in the .NET framework that will allow conversion or representation of a DateTime structure in military (24hr) time, even if only in a string conversion?
>
>There are lots of DateTime.To* methods but nothing that seems to allow for a military time representation.
>
>Thanks,
>Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform