Data.DB.TParam.AsDateTime
Delphi
property AsDateTime: TDateTime read GetAsDateTime write SetAsDateTime;
C++
__property System::TDateTime AsDateTime = {read=GetAsDateTime, write=SetAsDateTime};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | Data.DB.pas Data.DB.hpp |
Data.DB | TParam |
Description
Specifies the value of the parameter when it represents a date-time field.
Set AsDateTime to assign the value for a date-time field to the parameter. Setting AsDateTime sets the DataType property to ftDateTime.
Read the AsDateTime property to determine the value that was assigned to an output parameter, represented as a DateTime. The value of the parameter is converted to a DateTime value if possible. If a TDate value is assigned to a parameter via the AsDateTime property, the date portion of the TDate value is assigned to the parameter and the time portion is assigned a zero value. If AsDateTime is used to get the value for a TDate container, the date from the parameter is stored but the time value returned by AsDateTime is ignored.
Note: It is not possible to store a NULL value directly to a parameter using AsDateTime. Use the TParam Clear method instead.
See Also
Code Examples