Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxFilterCriteria.DateTimeFormat Property

Specifies the pattern for formatting date/time values.

#Declaration

Delphi
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