I want to convert a string such as "YYYYMMDD" or "DDMMYYYY" in DateTime object.
According to MSDN, the method Parse (string) can do this changes but I can not make it work.
Here is my code:
Code:using System; using System. Collections. Generic; using System. Text; using System. Globalization; namespace ConsoleApplication1 { class Program { static void Main (string [] args) { string date = "041110"; DateTime datetest = new DateTime () ; datetest = Parse (date); } } }
Bookmarks