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

Difference Between Truncate and Delete

Difference between Byte and Char in Oracle

Change date format from MM/DD/YYYY to DD/MM/YYYY