Protected Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.Click Dim medate As Date = TextBox1.Text Dim st As String = ConfigurationManager.ConnectionStrings("testingConnectionString").ToString Dim con As New Data.SqlClient.SqlConnection(st) con.Open() Dim q As String = "insert into mytest values('" & medate & "')" Dim com As New Data.SqlClient.SqlCommand(q, con) com.ExecuteNonQuery() con.Close() End Sub
toShortDateString()
ToString
ToString("yyyy/M/dd")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)