Hello, I have one DateTimePicker and two textbox (txtHour and txtMinute)
I want insert the value of datetimepicker (date) and textbox (hour and minute from two different textbox) to DateTime data type on my table, example: 2013-08-28 12:30:00 PM --> the value of 12 got from txtHour, the value of 30 got from txtMinute
How to do that?
Jump to Post
you can try like this, if i wrong please inform me
Dim dr As DataRow = DBDataSet.Tables("Table").NewRow cmdIn1 = conn.CreateCommand cmdIn1.CommandText = "INSERT INTO Table(Name, Sex, DateTime)VALUES('" & Trim(Name.Text) & "','" & Trim(Sex.Text) & "','" & Trim(DateTimePicker.Value) & "')" check = cmdIn1.ExecuteReader.RecordsAffected() If check > 0 Then …
All 5 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.