Listbox DisplayMember and DateTime Format

  • Thread starter Thread starter Hoffmania
  • Start date Start date
H

Hoffmania

Hello,

I am binding a DataSet to a listbox. This listbox is used to set the
current binding for an appointment page. A problem I have is that there
can only be one appointment per day and I would like the listbox to
only display the Date and not the Time. In otherwords, I want the
DisplayMember to call ToShortDateString() rather than ToStirng(). Or,
could I apply a formater or a format event to this basic binding.

Any help would be appreciated.
 
One possible way you could try is the make the value a string rather
than DateTime. For example you could modify the SQL to convert date to
appropriate string before filling the dataset, or you could manipulate
the dataset itself.

Thi
 
Back
Top