DateTime dd = DateTime.ParseExact
("27/09/2003", "dd/MM/yyyy");
I still get an error :
"(939): No overload for method 'ParseExact' takes '2'
arguments"
-----Original Message-----
Dates of that format are ambiguous. It's probably trying to parse this asMM/dd/yyyy. Clearly this specific date is dd/MM/yyyy but the parser doesn'ttry to figure that out. You can use DateTime.ParseExact, e.g.
DateTime dd = DateTime.ParseExact ("27/09/2003", "dd/MM/yyyy");
See the documentation for DateTime.Parse to see some more flexible examplesof how to do this without explicitly specifying the format.
"Yosi" <yo*******@hotmail.com> wrote in message
news:11****************************@phx.gbl...
Why i cann't convert date to DateTime :
System.DateTime dd= Convert.ToDateTime("27/09/2003");
How to do that , tjis one thowes an exception .
I can't find a Date class