Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Time in C#?
Message
 
 
À
21/06/2013 17:27:26
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01576867
Message ID:
01576889
Vues:
29
This seems to work nicely, but how to get AM/PM as a string?
DateTime dt;

if (DateTime.TryParse("10:30 AM", out dt))
{
   Console.WriteLine (dt.Hour);
   Console.WriteLine(dt.Minute);
  ? Console.WriteLine(dt.);
}
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform