Hi There,
I am tearing my hair out. I cannot see how to insert a date into SQL server.

I have a datetime field in an SQL database.
I want to store a .NET DateTime type into the SQL field.

I have tried:
string dateTimeNow = DateTime.Now.ToString();
testTimeStop = SqlDateTime.Parse(dateTimeNow);

and because I thought it might need the SQL format.

string dateTimeNow = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff");
testTimeStop = SqlDateTime.Parse(dateTimeNow);

In both cases I get an error:
"String was not recognized as a valid DateTime."

I have also tried a vast panoply of other ideas from the web. None of which have panned out.

I can't just store it as a varchar ( although I would like to!)


Any ideas / suggestions?

Thanks in advance
Richard