Format Dates in Combo Box

  • Thread starter Thread starter Pete
  • Start date Start date
P

Pete

How do you format dates in a combo box?
The dates from the database diaplay both the
date and time (i.e. 8/28/2003 12:00:00 AM).
What I want is just 8/28/2003.

Thanks in advance
 
The only way I know to change the format of data before displaying it is
to use the Format and Parse event handlers. In the book "ADO.NET IN A
NUTSHELL" pp. 134-135 there is a discussion about this. Essentially you
create a Binding for the data field, connect the format and parse
methods to the Binding, then add the Binding to the display field
(combobox in your case).
 
Back
Top