This post is a quick reference about how to convert a date from Umbraco and convert it into a C# DateTime when using dynamic binding. When you work with Umbraco, I strongly recommend using a strongly-typed model approach, to learn why, I suggest you read this article, How To Write Safe Testable Code When Using Dynamic Model Binding With Umbraco MVC.

One problem when we work with Umbraco is that dates are returned as "2016-08-16T00:00:00". If you try to put this in DateTime.Parse() method it won't convert correctly. Instead, you need to use XmlConvert.ToDateTime(). For my requirement, I wanted to display a date in the following format

16th August 2016

As DateTime doesn't provide a great way to deal with it, and I needed to write some custom code, I've included that snippet in the code below in case it helps someone out, but it's not needed to do the conversion.