Question

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

Was it helpful?

Solution

Change the TDateField's DisplayFormat :

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

OTHER TIPS

If you are using a dataware control, you can format the field data using the DisplayFormat property.

TDateTimeField(ADODataSet1.FieldByName('START_DATE')).DisplayFormat:='mmm-yyyy';

I haven't worked with this component but I think when you're filling up the combo, for each field in the list you can use shortmonthnames

http://www.delphibasics.co.uk/RTL.asp?Name=ShortMonthNames

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top