Derik Whittaker

Syndication

News


Parsing Twitter Date format to .Net DateTime

Recently when I needed to parse the twitter datetime format into a .Net DateTime I found this post on the web showing how to do it.  However, the format string in the post is setup for non-us format so I thought I would share how to do it for US formatted datetime.

const string format = "ddd MMMM dd HH:mm:ss zzzz yyyy";

var d = DateTime.ParseExact("Thu May 24 11:43:52 +0000 2012", format, System.Globalization.CultureInfo.InvariantCulture)

Hope this helps.

Till next time,


Posted 05-24-2012 7:53 AM by Derik Whittaker
Filed under: ,

[Advertisement]

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)