Re: Field DisplayFormat
- From: "Mac Davis" <newsgroups@xxxxxxxxxxxxxx>
- Date: Tue, 27 Sep 2005 20:28:05 -0400
Thanks Mike,
Works like a champ!
Mac
"Mike Shkolnik" <mshkolnik2002@xxxxxxx> wrote in message
news:4339a4e2@xxxxxxxxxxxxxxxxxxxxxxxxx
> Add the next code in AfterOpen event for your TClientDataset:
> begin
> (Dataset.FieldByName('yourDateFieldName) as TDateTimeField).DisplayFormat
> := 'mm/dd/yyyy'
> end
>
> --
> With best regards, Mike Shkolnik
> E-mail: mshkolnik@xxxxxxxxxxxxx
> WEB: http://www.scalabium.com
>
> "Mac Davis" <newsgroups@xxxxxxxxxxxxxx> wrote in message
> news:433979c0$1@xxxxxxxxxxxxxxxxxxxxxxxxx
>> If I programatically create a ClientDataSet then add a field --
>>
>> ds.FieldDefs.Add('Date', ftDateTime,0,False);
>>
>> How do I set the DisplayFormat of the Date?
>>
>> The DisplayFormat property is available in the Object Inspector when the
>> Dataset is a component, but when created programatically I cant find it.
>>
>> I want the date displayed as mm/dd/yyyy
>>
>> Thanks,
>> Mac
>>
>>
>
>
.
- References:
- Field DisplayFormat
- From: Mac Davis
- Re: Field DisplayFormat
- From: Mike Shkolnik
- Field DisplayFormat
- Prev by Date: Re: Field DisplayFormat
- Next by Date: Re: MS ACCES DELPHIE MASTER/SLAVE PROBLEM
- Previous by thread: Re: Field DisplayFormat
- Next by thread: how to assign a recordset of ado to a variant?
- Index(es):