I need to store date from my application in to my database which created in MS Access now i use datetimepicker in my application created in VB.net 03 what shuold be the necessary code required for it plz help me with code snippet...
asmit1987 0
Newbie Poster
Recommended Answers
Jump to Postthe red line is how to use datetimepicker :
cmdPendidikan1.CommandText = "INSERT INTO Pendidikan(IdPendidikan, Nis, Lulusan, LamaBelajar,SekolahAsal,Alasan,Kelas,Tgl) VALUES('" & Trim(IdPendidikan.Text) & "','" & Trim(cmbNis.SelectedItem) & "','" & Trim(txtLulusanDari.Text) & "','" & Trim(txtLamaBelajar.Text) & "','" & Trim(txtSekAsal.Text) & "','" & Trim(txtAlasan.Text) & "','" & Trim(cmbKelas.SelectedItem) & "','" & …
Jump to Postdon't be confused. Just focus in the red line, that is how to get value from datetimepicker.
this is new example :cmdTest.CommandText = "INSERT INTO Book(Id, Name, BirthDate) VALUES('" & Trim(txtId.Text) & "','" & Trim(txtName.Text) & "','" & dtBirthDate.Value.ToShortDateString & "')"
All 5 Replies
Jx_Man 987
Nearly a Senior Poster Featured Poster
asmit1987 0
Newbie Poster
Jx_Man 987
Nearly a Senior Poster Featured Poster
asmit1987 0
Newbie Poster
Jx_Man 987
Nearly a Senior Poster Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.