Skip to main content

IsDateType

function IsDateType: Boolean

Example

procedure ScriptEvent(var Value: variant);
begin
Value := Field.IsDateType;
end;

Usage

IsDateType reports whether the field DataType belongs to Velox's fixed four-member date/time set.

Additional Technical Info

IsDateType compares the live field's inherited DataType with a hard-coded set.

It returns true only for:

TFieldTypeMeaning
ftDatedate
ftTimetime
ftDateTimecombined Delphi date/time
ftTimeStampSQL timestamp

It returns false for every other value, including ftTimeStampOffset. This is an exact implementation list, not a test of whether the concrete field can convert through AsDateTime.

All four date types also occur in Velox IsNumericType, so callers should not treat the two predicates as mutually exclusive. The overlap is intentional in zero-sentinel helpers because Delphi dates/times are represented numerically and zero is a meaningful sentinel.

The read is constant-time, has no side effects and normally cannot raise while the field reference is valid. The field/dataset remains externally owned and unsynchronised.

External references

Created 2026-07-15