พอกดปุ่มบันทึก แล้วขึ้นerror ตามนี้คะ
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
The statement has been terminated.
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ConnString = "Server=ADMIN\SQLEXPRESS;Initial Catalog=nursing-room;Integrated Security=True"
Dim Conn = New SqlConnection(ConnString)
Conn.Open()
Dim CurrentDateTime = Now
Dim picture = "images/" & FileUpload1.FileName
Dim SQL = "insert into news values('" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & CurrentDateTime & "','" & picture & "','" & TextBox5.Text & "')"
Dim Cmd = New SqlCommand(SQL, Conn)
Cmd.ExecuteNonQuery()
FileUpload1.SaveAs(Server.MapPath("images/" & FileUpload1.FileName))
Response.Redirect("add-news.aspx")
End Sub