FlexCel Studio for VCL/LCL
ContentsIndex
PreviousUpNext
TCustomFlexCelReport.DateTimeFormat Property

Format to be applied to Date Cells, when no format is specified.

Pascal
property DateTimeFormat: string;
C++
__property AnsiString DateTimeFormat;

Excel doesn't have the concept of "Date" datatypes. All dates are just numbers, (the number of days from 1900) formatted to show as a date. 

 

That is, number "1" will stand for "1/1/1900" and number "3.25" (3 days and 1/4) will stand for "03/01/1900 06:00:00 a.m." 

 

When creating a template, you can specify the date format directly on the template, but when using generic reporting (##DataSet##*), you don't know which column will hold date values. 

 

So, if you specify a format on this property, all the date/time fields of the database on a generic report will be formatted with this string. 

 

The format string is one valid Excel format string, the ones you can see on Excel at "Edit->Format->Cells" 

 

Copyright (c) 2002-2008 TMS Software. All rights reserved.
What do you think about this topic? Send feedback!