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

No need to further detail the question, I think?
BadKarmaAsked:
Who is Participating?
 
kretzschmarConnect With a Mentor Commented:
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
 
BadKarmaAuthor Commented:
Thanks
0
All Courses

From novice to tech pro — start learning today.