Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
C#
strOLD = Convert.ToString(this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value);
strNEW = Convert.ToString(this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].EditedFormattedValue);



on cell validating the format of old date i.e value and new value after the click edit formatted value are different.One So even if the dates are same it shows value has been updated. How to make format of these two date same so that when dates are same it shows equal else update has been made.
Posted
Updated 16-Sep-11 5:56am
v2

1 solution

Could you cast them to a DateTime, then use ToString() on the DateTime objects to make them uniform?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900