Below code shows how to convert string which has both date and time to just the date without time.
string value = "1/1/2012 08:15:20";
DateTime dt = Convert.ToDateTime(value);
string shortDate = dt.ToShortDateString();
This Blog is dedicated to developers who are beginners and need help in their day to day programming like ASP.NET, VB.NET, C#, JQuery,Javascript,XML, AJAX -----Every good work of software starts by scratching a developer's personal itch.