Before that, the code was working fine, while the program didn't recognize the date format may be because of different cultureInfo. I am using the Convert.ToDateTime method to convert the DateTime format.
Input.TestDate = Convert.ToDateTime(gvwTest.Rows[i].Cells["TxnDate"].Value).ToString("yyyy-MM-dd HH:mm:ss");
As a result, it converted but with incorrect MM and dd.
From "1/6/2020" To "2020-01-06 00:00:00"
string test1 = gvwTest.Rows[i].Cells["TxnDate"].Value.ToString();
string test2 = gvwTest.Rows[i].Cells["TxnDate"].Value.GetType().ToString();
test1 = "1/6/2020";
test2 = "System.String";