Tries to converts a string to DateTimeOffset(String with day abbreviation)
using System;
using System.Globalization;
public class Example
{
public static void Main()
{
DateTimeOffset parsedDate;
string dateString;
// String with day abbreviation
dateString = "Thu May 01, 2008";
if (DateTimeOffset.TryParse(dateString, out parsedDate))
Console.WriteLine("{0} was converted to to {1}.", dateString, parsedDate);
}
}
Related examples in the same category