TAdsTable.AdsGetDate

Advantage TDataSet Descendant

Retrieves the date value from the given field formatted according to the format defined in DateFormat.

Syntax

function AdsGetDate( strFieldName : String ) : String;

Parameter

strFieldName

Name of the field to retrieve.

CAUTION It is recommended that this Advantage extended method not be used. Please read the Caution About Extended Methods for more information. The suggested native Delphi method to use instead is: TField.AsString or TField.AsDateTime. See your Delphi documentation for more information about this native Delphi method.

Description

AdsGetDate returns dates according to the date format set in DateFormat. It can be used to retrieve dates from date fields, short date fields, ModTime fields, and the date portion of timestamp fields.

Example

strDate := AdsTable1.FieldByName( ‘BirthDay’ ).AsString;

or

dtDate := AdsTable1.FieldByName( ‘BirthDay’ ).AsDateTime

See Also

AdsGetJulian

AdsSetDate

AdsSetField

AdsGetTime