DateTime.Parse () will take a string argument and try to generate its DateTime value. I'm a little rusty, but it should work for any date string that you can generate with DateTime.ToString ().
You can also take a look at DateTime.ParseExact (), which does the same as Parse (), but allows you to limit the possible input string formats. The following link should help you on both sides, as well as with any other date parsing functions within the framework.
http://msdn.microsoft.com/en-us/library/1k1skd40.aspx
nabrond
source share