How to convert dd to DateTime type?
HTH, Cheers
Maqsood Ahmed [MCP,C#]
Kolachi Advanced Technologies
http://www.kolachi.net
*** Sent via Developersdex http://www.developersdex.com ***
Do as Maqsood Ahmed told you, or use DateTime.ParseExact
string dd="1992/12/03";
DateTime dt = DateTime.ParseExact(dd, "yyyy/MM/dd", CultureInfo.InvariantCulture);
--
Happy coding!
Morten Wennevik [C# MVP]
"Maqsood Ahmed" <maqsoo...@gawab.com>
???????:u08d$oTVFH...@TK2MSFTNGP14.phx.gbl...
You can use DateTime.Parse(string) if the date is formatted in the default way as defined by your windows version. For me your date would caused an exception as DateTime on my system would have expected
03.12.1992.
Our solutions are locale independent and should work no matter what date format is default.
--