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:
TFieldType | Meaning |
|---|---|
ftDate | date |
ftTime | time |
ftDateTime | combined Delphi date/time |
ftTimeStamp | SQL 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
- Embarcadero DocWiki:
TField.DataTypedocuments the property inspected by Velox. - Free Pascal:
TField.DataTypesupplies compatible field-type context; exact membership above is Velox-defined.