Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Time in C#?
Message
 
 
To
21/06/2013 17:27:26
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01576867
Message ID:
01576889
Views:
31
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform