# MTCalendarPeriod

This object describes the time interval that determines peak, off-peak, or holiday codes for a given calendar's days.

(This object is used by the MTCalendar object.)

## Program ID

Metratech.MTCalendarPeriod.1

## Methods

GetCodeAsString | Returns the Calendar Code as a String (from the calendar enumtype).

## Properties

ID | The unique (database) ID for the period.
Code | The calendar code determined by this period (peak, off-peak, or holiday).
StartTimeAsString | The start time of this period expressed as a string.
EndTimeAsString | The end time of this period expressed as a string.
StartTime | The start time of this period expressed as the elapsed number of seconds since 12:00:00 AM that day.
EndTime | The end time of this period expressed as the elapsed number of seconds since 12:00:00 AM that day.

# Method Detail

## GetCodeAsString

Returns the Calendar Code as a String (from the calendar enumtype).

### Visual Basic Syntax

GetCodeAsString() As String

### C++ Syntax

HRESULT GetCodeAsString([out, retval] BSTR* pVal);

# Property Detail

## Code

The calendar code determined by this period (peak, off-peak, or holiday).

### Visual Basic Syntax

Property Code As Long

### C++ Syntax

HRESULT Code([out, retval] long *pVal);

HRESULT Code([in] long newVal);

## StartTimeAsString

The start time of this period expressed as a string.

### Visual Basic Syntax

Property StartTimeAsString As String

### C++ Syntax

HRESULT StartTimeAsString([out, retval] BSTR *pVal);

HRESULT StartTimeAsString([in] BSTR newVal);

## EndTimeAsString

The end time of this period expressed as a string.

### Visual Basic Syntax

Property EndTimeAsString As String

### C++ Syntax

HRESULT EndTimeAsString([out, retval] BSTR *pVal);

HRESULT EndTimeAsString([in] BSTR newVal);

## StartTime

The start time of this period expressed as the elapsed number of seconds since 12:00:00 AM that day.

### Visual Basic Syntax

Property StartTime As Long

### C++ Syntax

HRESULT StartTime([out, retval] long *pVal);

HRESULT StartTime([in] long newVal);

## EndTime

The end time of this period expressed as the elapsed number of seconds since 12:00:00 AM that day.

### Visual Basic Syntax

Property EndTime As Long

### C++ Syntax

HRESULT EndTime([out, retval] long *pVal);

HRESULT EndTime([in] long newVal);

## ID

This property specifies the unique (database) ID for the calendar.

### Visual Basic Syntax

Property ID As Long

### C++ Syntax

HRESULT ID([out, retval] long *pVal);

HRESULT ID([in] long newVal);

##