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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top