Skip to main content

TcxFilterCriteria.DateTimeFormat Property

Specifies the pattern for formatting date/time values.

Declaration

property DateTimeFormat: string read; write;

Property Value

Type
string

Remarks

The DateTimeFormat property identifies a formatting string used to convert date/time values to text representation when constructing FilterText. The FilterText property represents a string built from the current filter criteria. This string can be applied to a dataset or an SQL statement if needed.

The TcxDBDataFilterCriteria class provides the AutoDataSetFilter property which enables you to automatically apply FilterText to a connected dataset (for query datasets, the “WHERE “ + FilterText clause is added to the SQL statement).

Some datasets require date/time values be formatted in a specific manner when a filter is applied. For this purpose, use the DateTimeFormat property. If DateTimeFormat identifies an empty string, date/time values are formatted by the VarToStr function (VarToStr uses the system settings). Otherwise, the FormatDateTime function is used and the DateTimeFormat property value is passed as the format pattern. To know about format specifiers, refer to the FormatDateTime function description in the Delphi/C++ Builder help system.

See Also