Solved

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

Posted on 2004-08-26
2
253 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
ID: 11901390
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
ID: 11901540
Thanks
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PDF library for Delphi 2 120
How to fill array with TArray.Create? 14 87
how to manage invalidate between two tvirtualstringtree in same form? 1 113
find a node in VST 2 68
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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

786 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