Solved

DateTime field in DBGrid - how to show just the date, and not the time?

Posted on 2004-08-26
2
248 Views
Last Modified: 2010-04-05
No need to further detail the question, I think?
0
Comment
Question by:BadKarma
2 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 50 total points
Comment Utility
place a displayformat in the property of the underlying TDateTimeField

if you have persistent fields, then you can set it at designtime in the Objectinspector

at runtime use this in the afteropen-vevnt of your dataset

begin
  TDateTimeField(Dataset.FieldByName('FieldNameHere')).Displayformat := 'dd.mm.yyyy';  //or what format you need
end;

hope thats it

meikl ;-)
0
 

Author Comment

by:BadKarma
Comment Utility
Thanks
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now