DateTimePicker Problems

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael Beatty

    #1

    DateTimePicker Problems

    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?


  • Raymond

    #2
    RE: DateTimePicker Problems

    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

    "Michael Beatty" wrote:
    [color=blue]
    > 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?
    >
    >
    >[/color]

    Comment

    Working...