COMVariant::createFromTime Method
Creates a new COMVariant object and initializes it with a time value in one operation.
Syntax
client server public static COMVariant createFromTime(int value, [COMVariantInOut inOutFlag])
Run On
Called
Parameters
- value
Type: int
The time value, expressed as the number of seconds since midnight.
- inOutFlag
Type: COMVariantInOut Enumeration
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:
Return Value
Type: COMVariant Class
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.
Examples
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());
See Also
COMVariant::createFromDateAndTime Method