views:

78

answers:

3

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

alt text

A: 

hi,

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

best regards,

Radu Barbu
+1  A: 

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';
RRUZ
A: 

Change the TDateField's DisplayFormat :

with Table1 do
    TDateField(FieldByName('Date1')).DisplayFormat:='mmm yyyy';
SimaWB
if it still display '1/1/2009', what does "i can change the combobox date format with your code" mean ?
SimaWB