Hello,
I have a stored procedure that populates dates in SQL Server 2012 (InsDate AS date). When I execute the spoc i get InsDate=2015-06-06 which is the format I need.
I retieve data into my webform using the following code:
SqlCommand command = new SqlCommand("SelectSproc", connection);
command.CommandType = CommandType.StoredProcedure;
SqlDataAdapter adapter = new SqlDataAdapter(command);
DataSet ds = new DataSet();
adapter.Fill(ds);
insDate.Text = ds.Tables[0].Rows[0]["InsDate"].ToString();
Result: insDate.Text= 2015-06-06 12:00:00 am
Why do I get the time part since I'm populating only dates from the SQL? How can I get rid of the time part?
Thank you in advance.

Hemlata KushwahaRank #6,963 · 252 reputationPosted Sep 23, 2015, 11:14 PM EDT
Manas MohapatraRank #182 · 13.2K reputationPosted Sep 23, 2015, 10:50 PM EDT
Chriz LRank #9,376 · 207 reputationPosted Sep 23, 2015, 10:55 PM EDT
Hemlata KushwahaRank #6,963 · 252 reputationPosted Sep 23, 2015, 11:04 PM EDT
Chriz LRank #9,376 · 207 reputationPosted Sep 23, 2015, 11:08 PM EDT
Manas MohapatraRank #182 · 13.2K reputationPosted Sep 23, 2015, 11:14 PM EDT
Chriz LRank #9,376 · 207 reputationPosted Sep 23, 2015, 11:18 PM EDT
Hemlata KushwahaRank #6,963 · 252 reputationPosted Sep 23, 2015, 11:52 PM EDT