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

Example:

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

All 3 Replies

Example:

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

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

Example:

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 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.