Thursday, 16 May 2013

Format Twitter Feed Create Date

Here's how to format the Twitter Date to the C# .net DateTime datatype. You will need to use "using System.Globalization;"

string date = [YourTwitterDateHere];

DateTime twitterDate = DateTime.ParseExact(date, "ddd MMM dd HH:mm:ss zzz yyyy", CultureInfo.InvariantCulture);

Why they have this format is beyond me, but this is how you can use it for what ever purpose you require in your project. Enjoy!

No comments: