I am developing windows application.
In that i have date in the string format as>> fileDate="15/03/2013"
I want it to be get converted into date format as my database field is datetime
.
I used following things for it>>
DateTime dt = DateTime.ParseExact(fileDate, "yyyyy-DD-MM", CultureInfo.InvariantCulture);
DateTime dt = DateTime.Parse(fileDate);
Both of these methods proved failure giving me error>>
String was not recognized as a valid DateTime.
What can be mistake?
Is there another technique to do that?