Help Center

CPowerTime.NewDatemethod

Sets a new date to this **CPowerTime** object.

DateTimemethoddocumented

Syntax

SUB NewDate (BYVAL nYear AS LONG = 0, BYVAL nMonth AS LONG = 0, BYVAL nDay AS LONG = 0)

Parameters

NameDescription
nYearThe new year. The valid values for this member are 1601 through 30827.
nMonthThe new month. The valid values for this member are 1 through 12.
nDayThe new day. The valid values for this member are 1 through 31.

Description

Sets a new date to this CPowerTime object.

The date component of the CPowerTime object is assigned a new value based upon the specified parameters. The time component is unchanged. If parameters are invalid, GetLastError will return ERROR_INVALID_PARAMETER.

Reference

  • Defined in AfxNova/CPowerTime.inc:594
  • Documented in DateTime/CPowerTime Class.md
  • Topic: CPowerTime Class