Search code examples
delphicomboboxdelphi-7date-formatdatefield

How to change the date format in a DB aware combo box?


I'm using TwwDbLookupComboDlg component. I want to change the date format in the combobox (as shown below) from 1/1/2009 to Jan 2009, any idea?

TwwDbLookupComboDlg


Solution

  • Change the TDateField's DisplayFormat :

    with Table1 do
        TDateField(FieldByName('Date1')).DisplayFormat:='mmm yyyy';