VB.NET DateTimePicker – Get and Set Date

User Management System
Learn Kotlin, Retrofit, MVVM and MySQL using this all-in-one app. It is designed to be beginner friendly.


In this simple vb.net example,we see how to get and show in message box or set date using the datetimepicker vb.net component.

Public Class Form1

    Dim d As String = ""

    Private Sub retrieveBtn_Click(sender As Object, e As EventArgs) Handles retrieveBtn.Click
        d = DateTimePicker1.Value.ToString()

    End Sub

    Private Sub setBtn_Click(sender As Object, e As EventArgs) Handles setBtn.Click
        d = "10/2/2030"
        DateTimePicker1.Value = d
    End Sub
End Class
Android MySQL Retrofit2 Multipart CRUD,Search,Pagination rating

When I was a 2nd year Software Engineering student, I buillt a now defunct online tool called Camposha(from Campus Share) using my then favorite language C#(ASP.NET) to compete OLX in my country(Kenya). The idea was to target campus students in Kenya. I got a few hundred signups but competing OLX proved too daunting. I decided to focus on my studies, learning other languages like Java,Python,Kotlin etc while meanwhile publishing tutorials at my YouTube Channel ProgrammingWizards TV which led to this site(camposha.info). Say hello or post me a suggestion: oclemmi@gmail.com . Follow me below; Github , and on my channel: ProgrammingWizards TV

We will be happy to hear your thoughts

Leave a reply

three + 5 =

Reset Password
Compare items
  • Total (0)
Shopping cart