Hi,
I have a string coming from excel as "8/3/1989" (m/d/yyyy) in below code.I need to convert it in to 08/03/1989 .In excel coloumn the format is text.I alwas getting error after every conversion like input string is not in correct format in. below code I am using
string effdate= xlWorksheet.Cells[i, 8].Value.ToString(); DateTime dt = DateTime.Parse(effdate); xlWorksheet.Cells[i, 8] = dt.ToString(); xlWorksheet.Cells[i, 8].NumberFormat = "MM/DD/YYYY";