Objective: Given a string in UTC format, convert it to a easily readable format
Solution:
string input = "2006-06-14T17:15:55.197-07:00";
string output = Convert.ToDateTime(input).ToString("f");
Assuming the culture is en-US, the variable "output" will be set to the value "Wednesday, June 14, 2006 5:15 PM".
References:
.NET Framework Developer's Guide
Subscribe to:
Post Comments (Atom)
What is success?
The journey of life takes us through varied experiences like landing an admission at a prestigious college, earning a degree, getting hired,...
-
Recently after a domain password change, I got the following error in trying to run the webrole. Can not log on locally to WebRole as us...
-
I was trying my hands at creating a .NET 2.0 component that can be consumed by a COM application. One of the errors I got in the process of...
-
After editing the post-build event of my project in VS 2005, the following error came up "'Exec' task needs a command to execut...
No comments:
Post a Comment