Advantage TDataSet Descendant
Retrieves the time value from the given time or timestamp field.
function AdsGetTime( const strFieldName : string ) : string;
|
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. See your Delphi documentation for more information about this native Delphi method.
AdsGetTime returns the time value formatted in 12 hour time with hours, minutes, seconds and an AM/PM indicator as appropriate from either a time field, ModTime field, or the time portion of a timestamp field. If, for example, the time field contains 5415000 milliseconds (since midnight), the string value returned will be "01:30:15 AM". If the exact number of milliseconds is required, use AdsGetMilliseconds
strTime := AdsTable1.FieldByName( ‘TimeEntered’ ).AsString;