Skip to content

Latest commit

 

History

History
88 lines (56 loc) · 2.64 KB

swbemdatetime-year.md

File metadata and controls

88 lines (56 loc) · 2.64 KB
description ms.assetid ms.tgt_platform title ms.topic ms.date topic_type api_name api_type api_location
Gets or sets a value that represents the year component of the DATETIME value.
eab3738a-c92a-4602-b1ee-e2547da88308
multiple
SWbemDateTime.Year property (Wbemdisp.h)
reference
05/31/2018
APIRef
kbSyntax
SWbemDateTime.Year
ISWbemDateTime.Year
ISWbemDateTime.get_Year
ISWbemDateTime.put_Year
COM
Wbemdisp.dll

SWbemDateTime.Year property

The Year property of the SWbemDateTime object gets or sets a value that represents the year component of the DATETIME value. The value must be in the range of 0000 - 9999 or the error wbemErrValueOutOfRange is returned.

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

This property is read/write.

Syntax

SWbemDateTime.Year As Long

Property value

Error codes

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

wbemErrValueOutOfRange - 2147749931 (0x8004102B)

The value was not in the range of 0000 through 9999.

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.YearSpecified

SWbemDateTime

DATETIME