Search code examples
c#.netflash

Convert Actionscript date string


I'd like to convert a bunch of date strings like the following Mon Aug 7 15:32:52 GMT+0900 2007 to C# datetime objects.

Is there anything built in to the .net framework to do this or will I have to parse the string into date parts?

Many thanks,


Solution

  • You could use:

     DateTime.Parse(datestring);
    

    or

    DateTime.TryParse(string, IFormatProvider, DateTimeStyles, out DateTime)