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
No comments:
Post a Comment