Parse a string to DateTime

To illustrate, suppose we generate a culture-insensitive DateTime string s as follows:

using System;
using System.Text;
using System.Globalization;
class Sample
    public static void Main()
        string s = DateTime.Now.ToString("o");
        DateTime dt1 = DateTime.ParseExact(s, "o", null);

The output:

12/15/2010 1:09:49 PM  |  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.