I need to convert "date and time" to "date" in C #, keeping DateTime format (without converting to string).
In the code, I'm converting an object to datetime, but I need to remove the time for it as well to display it in a DataGridTextColumn
.
t.DataDeContrato = Convert.ToDateTime(row.ItemArray[6]);