# MTPCTimeSpan

Specifies a time range for effective dates.

## Program ID

Metratech.MTPCTimeSpan.1

## Methods

SetStartDateNull | Sets the start date to NULL (infinite), a NULL start date means that any date in the past will be effective.
SetEndDateNull | Sets the end date to NULL (infinite), a NULL end date means that any date in the future will be effective.
IsEndDateNull | This method returns true if the end date is NULL (infinite).
IsEndDateBeforeStart | This method returns true if the end date is before the start date.
IsStartDateNull | This method returns true if the start date is NULL (infinite).
Validate | Normalizes members and validates properties. On failure, a user error will be raised.
Normalize | Normalizes members and validates properties. On failure, a user error will be raised.

## Properties

Properties | Gets all (core and extended) properties of this priceable item by name or collection.
ID | The unique (database) ID.
StartDate | For the ABSOLUTE start date type, this is the start date for the NEXT_BILLING_PERIOD start date type. This date determines the beginning of the next billing period.[??]
StartDateType | Type of start date ??enums
StartOffset | For SUBSCRIPTION_RELATIVE start date type. This property specifies the number of days after the start of subscription.
EndDateType | type of end date ??
EndDate | For the ABSOLUTE start date type, this is the start date for the NEXT_BILLING_PERIOD start date type. This date that determines the next billing period [??]
EndOffset | For the SUBSCRIPTION_RELATIVE end date type. This property specifies the number of days after the start subscription date.

# Method Detail

## SetStartDateNull

This method sets the start date to NULL (infinite), a NULL start date means that any date in the past will be effective.

### Visual Basic Syntax

SetStartDateNull()

### C++ Syntax

HRESULT SetStartDateNull();

##

## SetEndDateNull

This method sets the end date to NULL (infinite), a NULL end date means that any date in the future will be effective.

### Visual Basic Syntax

SetEndDateNull()

### C++ Syntax

HRESULT SetEndDateNull();

##

## IsEndDateNull

This method returns true if the end date is NULL (infinite).

### Visual Basic Syntax

IsEndDateNull() As Boolean

### C++ Syntax

RESULT IsEndDateNull([out, retval] VARIANT_BOOL* pVal);

##

## IsEndDateBeforeStart

This method returns true if the end date is before the start date.

### Visual Basic Syntax

IsEndBeforeStart() As Boolean

### C++ Syntax

HRESULT IsEndBeforeStart([out, retval] VARIANT_BOOL* pVal);

##

## IsStartDateNull

This method returns true if the start date is NULL (infinite).

### Visual Basic Syntax

IsStartDateNull() As Boolean

### C++ Syntax

HRESULT IsStartDateNull([out, retval] VARIANT_BOOL* pVal);

##

## Validate

This method normalizes members and validates properties. On failure, a user error will be raised.

### Visual Basic Syntax

Validate()

### C++ Syntax

HRESULT Validate();

##

## Normalize

This method normalizes members and validates properties. On failure, a user error will be raised.

### Visual Basic Syntax

Normalize()

### C++ Syntax

HRESULT Normalize();

# Property Detail

## Properties

This property gets all (core and extended) properties of this priceable item by name or collection.

### Visual Basic Syntax

Property Properties As IMTProperties

### C++ Syntax

HRESULT Properties([out, retval] IMTProperties **pVal);

##

## ID

This property sets the unique (database) ID.

### Visual Basic Syntax

Property ID As Long

### C++ Syntax

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

HRESULT ID([in] long newVal);

##

## StartDate

For the ABSOLUTE start date type, this is the start date for the NEXT_BILLING_PERIOD start date type. This property specifies the date determining the beginning of the next billing period.

### Visual Basic Syntax

Property StartDate As DATE

### C++ Syntax

HRESULT StartDate([out, retval] DATE *pVal);

HRESULT StartDate([in] DATE newVal);

##

## StartDateType

Type of start date ??enums

### Visual Basic Syntax

Property StartDateType As MTPCDateType

### C++ Syntax

HRESULT StartDateType([out, retval] MTPCDateType *pVal);

HRESULT StartDateType([in] MTPCDateType newVal);

##

## StartOffset

For SUBSCRIPTION_RELATIVE start date type. This property specifies the number of days after the start of subscription.

### Visual Basic Syntax

Property StartOffset As Long

### C++ Syntax

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

HRESULT StartOffset([in] long newVal);

##

## EndDateType

Type of end date ??

### Visual Basic Syntax

Property EndDateType As MTPCDateType

### C++ Syntax

HRESULT EndDateType([out, retval] MTPCDateType *pVal);

HRESULT EndDateType([in] MTPCDateType newVal);

##

## EndDate

For the ABSOLUTE start date type, this property sets the start date for the NEXT_BILLING_PERIOD start date type. This date that determines the next billing period ??

### Visual Basic Syntax

Property EndDateType As MTPCDateType

### C++ Syntax

HRESULT EndDateType([out, retval] MTPCDateType *pVal);

HRESULT EndDateType([in] MTPCDateType newVal);

##

## EndOffset

For the SUBSCRIPTION_RELATIVE end date type. This property specifies the number of days after the start subscription date.

### Visual Basic Syntax

Property EndOffset As Long

### C++ Syntax

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

HRESULT EndOffset([in] long newVal);