Board index » delphi » TimeStamp Format in DBGrid

TimeStamp Format in DBGrid

How can I cause a DBGrid column to drop the seconds on Paradox TimeStamp
fields?

I have configured the BDE not to keep seconds, and also changed my
regional settings in Control Panel to drop the seconds.  Still, my
DBGrid displays the date followed by the time with seconds on it
(h:mm:ss:AM/PM).  Any ideas of how I can get rid of the seconds display?

David Miller
Da...@Rentpro.com

 

Re:TimeStamp Format in DBGrid


Hello David,

DBGrid displays field value from underlaying dataset using
TField.DisplayFormat property.
So double-click the dataset component and add persistent field in the Fields
Editor. Then select the field and type in your format mask in the Object
Inspector.

--
Kind regards, Andrei Fomine,
DbAltGrid allows free-form layout and hierarchical columns structure
in a DBGrid descendant. http://www.dbaltgrid.com

Quote
David Miller <Da...@Rentpro.com> wrote in message

news:8je39b$pmf10@bornews.borland.com...
Quote
> How can I cause a DBGrid column to drop the seconds on Paradox TimeStamp
> fields?

> I have configured the BDE not to keep seconds, and also changed my
> regional settings in Control Panel to drop the seconds.  Still, my
> DBGrid displays the date followed by the time with seconds on it
> (h:mm:ss:AM/PM).  Any ideas of how I can get rid of the seconds display?

> David Miller
> Da...@Rentpro.com

Re:TimeStamp Format in DBGrid


Quote
In article <8je39b$pm...@bornews.borland.com>, David Miller wrote:
> DBGrid displays the date followed by the time with seconds on it
> (h:mm:ss:AM/PM).  Any ideas of how I can get rid of the seconds display?

Set the DisplayFormat of the underlying TField.

 Mike Orriss (TeamB)
 (Unless stated otherwise, my replies relate to Delphi 4.03/5.00)
 (Unsolicited e-mail replies will most likely be ignored)

Other Threads