Partilhar via


COMVariant.createFromTime Method

Definition

Overloads

createFromTime(Int32)

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

createFromTime(Int32, COMVariantInOut)

createFromTime(Int32)

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

public:
 static Dynamics::AX::Application::COMVariant ^ createFromTime(int num1);
public static Dynamics.AX.Application.COMVariant createFromTime (int num1);
static member createFromTime : int -> Dynamics.AX.Application.COMVariant
Public Shared Function createFromTime (num1 As Integer) As COMVariant

Parameters

num1
Int32

Returns

The new COMVariant object.

Remarks

The COMVariant object that is created by this method has the data type VT_DATE (date/time). You can change the data type of an existing COMVariant object to VT_DATE by using the variantType method or by passing in a time value by using the time property method.

The following example will create a COMVariant object and set the time part to 10 seconds past midnight.

COMVariant theTime; 
theTime = COMVariant::createFromTime(10); 
info(theTime.toString());

Applies to

createFromTime(Int32, COMVariantInOut)

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

Parameters

_value
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:

_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:

Returns

Applies to