I am using VSTS 2008 + C# + .Net 3.5 + ADO.Net + SQL Server 2008. I have some C# string type variables, and I want to insert them into database as type DateTime, any code samples?
My problem is how to do the conversion from string to database DateTime type.
Have a look at the
DateTime.Parse()method.Edit: I suppose you use the
SqlCommand, then you just add the resulting c#DateTimeobject to theParameterscollection.