Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-08-26
2
Medium Priority
?
273 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 200 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Screencast - Getting to Know the Pipeline
Suggested Courses

773 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