i have a datetimepicker and a textbox

i code inside in the datetimepicker

 Private Sub DateTimePicker2_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker2.ValueChanged
        TextBox1.Text = DateTimePicker2.Value.ToString

''7/16/2015 9:03:03'' PM is the output i my textbox, how i will remove the time when i input a date from the datetimepicker? thank you

Hi,

Try This:

TextBox1.Text = DateTimePicker2.Value.ToString("dd/mm/yyyy")

Regards
Veena

You should use this instead

TextBox1.Text = DateTimePicker2.Value.Date
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.