How to allow the user to select the date from the DateTimePicker and store that selected date ,month and year in the database table?
What is to be written inside insert query of code?

Recommended Answers

All 3 Replies


Dim sqls As String = "INSERT INTO table (column1) VALUE ('" & DateTimePicker1.Value & "')"

And how to retrieve the same stored datetimepicker value from the databse to the textbox on other page?


Dim sqls As String = "SELECT column1 FROM table WHERE primarykey=value"
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.