Help Center

CPowerTime.NewTimemethod

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

DateTimemethoddocumented

Syntax

SUB NewTime (BYVAL nHour AS LONG = 0, BYVAL nMinute AS LONG = 0, BYVAL nSecond AS LONG = 0, BYVAL nMSecond AS LONG = 0)

Parameters

NameDescription
nHourThe new hour. The valid values for this member are 1 through 23.
nMinuteThe new minute. The valid values for this member are 1 through 59.
nSecondThe new second. The valid values for this member are 1 through 59.
nMSecondThe new millisecond. The valid values for this member are 1 through 999.

Description

Sets a new time to this CPowerTime object.

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

Reference

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