SWbemDateTime.Day property

The Day property of the SWbemDateTime object gets or sets a value that represents the day component of the datetime value. The value must be in the range of 1 through 31 if IsInterval is FALSE. However, error checking is not sensitive to the month value. Thus, the in-range value of 31 will not return an error in the cases where the SWbemDateTime.Month value is for a month of fewer than 31 days (February, April, June, September, November).

The default value for Day is 01.

For an explanation of this syntax, see Document Conventions for the Scripting API.

This property is read/write.

Syntax

SWbemDateTime.Day As Long

Property value

Error codes

After you get or set the Day property, the Err object may contain the error code below.

wbemErrValueOutOfRange - 2147749931 (0x8004102B)

If IsInterval is TRUE and the range of correct values exceeds 0 through 99999999.

Examples

For examples of using the SWbemDateTime object to convert CIM DATETIME values to and from either the FILETIME format or the VT_DATE format, see WMI Tasks: Dates and Times. For a description of the CIM DATETIME format, see Date and Time Format.

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Header
Wbemdisp.h
Type library
Wbemdisp.tlb
DLL
Wbemdisp.dll
CLSID
CLSID_SWbemDateTime
IID
IID_ISWbemDateTime

See also

SWbemDateTime.DaySpecified

SWbemDateTime

DATETIME