title: Default date in datetimepicker in visual studio
body: <p>If the user selects the date in the DateTimePicker, it only picks up the date, which is what I need. However, if the user doesn't select any date and leaves the DateTimePicker as today's date, it shows date + time. The data is stored in an Access database. I want to store the date only in the Access store when the user leaves the DateTimePicker to today's date (without changing any date).</p>
  
  <pre><code>Me.DateTimePicker1.CustomFormat = "dd-MM-yyyy"
  Me.DateTimePicker1.DataBindings.Add(New System.Windows.Forms.Binding("Value", Me.OrderdetailsBindingSource, "OrderDate", True))
  Me.DateTimePicker1.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.OrderdetailsBindingSource, "OrderDate", True))
  Me.DateTimePicker1.Font = New System.Drawing.Font("Tahoma", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
  Me.DateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom
  Me.DateTimePicker1.Location = New System.Drawing.Point(158, 39)
  Me.DateTimePicker1.Name = "DateTimePicker1"
  Me.DateTimePicker1.Size = New System.Drawing.Size(294, 28)
  Me.DateTimePicker1.TabIndex = 2
  Me.DateTimePicker1.Value = New Date(2019, 6, 18, 0, 0, 0, 0)
  </code></pre>