Appearance
Field.AsDateTime
Declaration
property AsDateTime: string;
Example
pascal
procedure OnMapEvent(var Value:Variant);
begin
Value := Dataset['myfield'].AsDateTime; //the value of myfield is returned as a Date Time
end;Description
Returns the value of the Field object as a Datetime (TDateTime). If the field is null then the default date of 12/30/1899 12:00 am.
It is recommended that you use this property when referencing Datetime type fields. This will help you avoid issues with null values causing Datetime and Formatting functions to fail.