I have a string datetime in this format "dd-MM-yyyy HH:mm:ss.fff"
like so..
DateTime mydate = Convert.ToDateTime("13-09-2010 02:30:14.905");
result.SetValue(1, mydate);
//I get a error saying 'String was not recognized as a valid DateTime'
if i do it this way
DateTime mydate = DateTime.ParseExact("13-09-2010 02:30:14.905", "dd-MM-yyyy HH:mm:ss.fff", CultureInfo.CurrentCulture);
result.SetValue(1, mydate);
it works fine but formats it without the milliseconds.
i just need the datetime object to hold my formatted time so i can insert it.