Solution to error - String was not recognized as a valid DateTime.
                                                      or
 Conversion from string "29/04/2020" to type 'Date' is not valid

Save date in SQL DB

Dim requestdate As String
            requestdate = DateTime.ParseExact(txtfrom.Text, "dd/MM/yyyy", Nothing).ToString("yyyy/MM/dd")

comm.Parameters.AddWithValue("@req_date", requestdate)

Comments

Popular posts from this blog

show (value1,value2) in one column in sql