DateToPeriod2

ACCPAC Common Controls

AccpacFiscalCalendar.DateToPeriod2

Calculates the period number, given a date, period type and length, and a base date.

Function DateToPeriod2(
  Date As Date,
  PeriodType As tagPeriodType,
  PeriodLength As Integer,
  BaseDate As Date,
  Period) As Boolean

Parameters

Date

[in] the date

PeriodType

[in] the period type

PeriodLength

[in] the period length

BaseDate

[in] the starting date of the first period

Period

[out] returns the period number that contains the specified date

Return Value

Returns whether the period number was successfully determined.

Remarks

Script languages, such as Javascript, that do not accept "out" parameters, should use this variation of the DateToPeriod function.