date time picker

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

    #1

    date time picker

    Hi,

    i am using a datetimepicker to select a date and i want
    this value to be inputted into a listbox. The problem im
    ahving is i get the date and the time appearing. I only
    require the date. Is there a way around this?
  • Norman Yuan

    #2
    Re: date time picker

    DateTimePicker' Value property holds actual DateTime value, while its Format
    property determines how the DateTime value is displayed. You can also define
    your own display format by using CustomFormat property.

    In your case, now that you want to add DateTimePicker' s value into a
    ListBox, you simply do your own formating when add it to ListBox:

    MyListBox.Items .Add(myDateTime Picker.Value.To ShortDateString ());

    "Eva" <anonymous@disc ussions.microso ft.com> wrote in message
    news:05d501c3b2 bf$e068fb60$a10 1280a@phx.gbl.. .[color=blue]
    > Hi,
    >
    > i am using a datetimepicker to select a date and i want
    > this value to be inputted into a listbox. The problem im
    > ahving is i get the date and the time appearing. I only
    > require the date. Is there a way around this?[/color]


    Comment

    Working...