DateTimePicker Problems

  • Thread starter Thread starter Michael Beatty
  • Start date Start date
M

Michael Beatty

I want to store only the time in an access database using VB.Net. I'm using
a date time picker on my VB form that has a custom format set to "hh:mm".
When I send the data to the DB the date, not the time is stored. What am I
doing wrong?
 
Hi Michael,

Try set the parameter type to DBTime instead of the default DBDate.
In yr code, set the parameter.value = dateTimePicker.value.TimeOfDay

You can restrict the data format by setting the format property in yr Access table column.

Hope this help

Ray
 
Back
Top