Share via


COMVariant.createDateFromYMD Method

Definition

Overloads

createDateFromYMD(Int32, Int32, Int32)

Creates a new COMVariant object and initializes it with a date value in one operation.

createDateFromYMD(Int32, Int32, Int32, COMVariantInOut)

createDateFromYMD(Int32, Int32, Int32)

Creates a new COMVariant object and initializes it with a date value in one operation.

public:
 static Dynamics::AX::Application::COMVariant ^ createDateFromYMD(int num1, int num2, int num3);
public static Dynamics.AX.Application.COMVariant createDateFromYMD (int num1, int num2, int num3);
static member createDateFromYMD : int * int * int -> Dynamics.AX.Application.COMVariant
Public Shared Function createDateFromYMD (num1 As Integer, num2 As Integer, num3 As Integer) As COMVariant

Parameters

num1
Int32
num2
Int32
num3
Int32

Returns

The new COMVariant object.

Remarks

The COMVariant object that is created by this method has the data type VT_DATE (date/time). This method allows you to use dates that are outside the range for the Finance and Operationsdate data type (0111901 to 31122154). For dates within the date range, you can use the COMVariant.createFromDate method.

The following example creates a COMVariant object and initializes it with the date 01 January 4015.

COMVariant myDate; 
myDate = COMVariant::createDateFromYMD(4015,1,1);

Applies to

createDateFromYMD(Int32, Int32, Int32, COMVariantInOut)

public:
 static Dynamics::AX::Application::COMVariant ^ createDateFromYMD(int _year, int _month, int _day, Dynamics::AX::Application::COMVariantInOut _inOutFlag);
public static Dynamics.AX.Application.COMVariant createDateFromYMD (int _year, int _month, int _day, Dynamics.AX.Application.COMVariantInOut _inOutFlag);
static member createDateFromYMD : int * int * int * Dynamics.AX.Application.COMVariantInOut -> Dynamics.AX.Application.COMVariant
Public Shared Function createDateFromYMD (_year As Integer, _month As Integer, _day As Integer, _inOutFlag As COMVariantInOut) As COMVariant

Parameters

_year
Int32

A flag that determines whether the object can be used to pass data to a COM method or COM property, to receive data, or both. This parameter is optional. Possible values are: COMVariantInOut::OUT_RETVAL

_month
Int32

A flag that determines whether the object can be used to pass data to a COM method or COM property, to receive data, or both. This parameter is optional. Possible values are: COMVariantInOut::OUT_RETVAL

_day
Int32

A flag that determines whether the object can be used to pass data to a COM method or COM property, to receive data, or both. This parameter is optional. Possible values are: COMVariantInOut::OUT_RETVAL

_inOutFlag
COMVariantInOut

A flag that determines whether the object can be used to pass data to a COM method or COM property, to receive data, or both. This parameter is optional. Possible values are: COMVariantInOut::OUT_RETVAL

Returns

Applies to