แชร์ผ่าน


COMVariant.date Method

Definition

Overloads

date()

Gets or sets the date part of the value of a COMVariant object of the VT_DATE data type.

date(Date)

date()

Gets or sets the date part of the value of a COMVariant object of the VT_DATE data type.

public:
 virtual Microsoft::Dynamics::Ax::Xpp::AxShared::Date date();
public virtual Microsoft.Dynamics.Ax.Xpp.AxShared.Date date ();
abstract member date : unit -> Microsoft.Dynamics.Ax.Xpp.AxShared.Date
override this.date : unit -> Microsoft.Dynamics.Ax.Xpp.AxShared.Date
Public Overridable Function date () As Date

Returns

Microsoft.Dynamics.Ax.Xpp.AxShared.Date

The current value.

Remarks

If you pass in a value that has a different data type than the object, the data type of the object will be changed to match the data type of the value. A COMVariant object has a date and time data type if its data type is set to COMVariantType::VT_DATE. When you set the value of the object, you must set the time part of the value in addition to the date. To set the time part of the value, use the time property.

The following example creates a COMVariant object of type VT_DATE and sets the date part of the value to 24 December 1998, and the time part of the value to 13.24.

{ 
    COMVariant var = new COMVariant( 
        COMVariantInOut::IN_OUT,  
        COMVariantType::VT_DATE); 
    // Set value of the object 
    var.date(Str2Date("12.24.1998", 213)); 
    var.time(Str2Time("13:24:00")); 
}

Applies to

date(Date)

public:
 virtual Microsoft::Dynamics::Ax::Xpp::AxShared::Date date(Microsoft::Dynamics::Ax::Xpp::AxShared::Date _newValue);
public virtual Microsoft.Dynamics.Ax.Xpp.AxShared.Date date (Microsoft.Dynamics.Ax.Xpp.AxShared.Date _newValue);
abstract member date : Microsoft.Dynamics.Ax.Xpp.AxShared.Date -> Microsoft.Dynamics.Ax.Xpp.AxShared.Date
override this.date : Microsoft.Dynamics.Ax.Xpp.AxShared.Date -> Microsoft.Dynamics.Ax.Xpp.AxShared.Date
Public Overridable Function date (_newValue As Date) As Date

Parameters

_newValue
Microsoft.Dynamics.Ax.Xpp.AxShared.Date

The new value; optional.

Returns

Microsoft.Dynamics.Ax.Xpp.AxShared.Date

Applies to