TSGLPeriodDate

Description

This function returns the begin or end date for a specific period.

Syntax

= TSGLPeriodDate ( Prefixes , FiscalYear , FiscalPeriod , DateType , DataFolders )

Example

=TSGLPeriodDate("10",2001,5,"PeriodEnd")
Returns prefix 10's ending date for period 5 of fiscal year ending 2001.

Arguments

ArgumentDescription
PrefixesOptional - If your account format does not include prefixes, leave this argument blank. This argument specifies the GL prefix that should be returned. This may one of the following types of values:
BlankIndicates that the period date will be based on the first prefix found.
Example: ""
Single PrefixSpecifies the prefix for which the period date should be returned.
Example: "1-10"
Prefix MaskIndicates a set of prefixes. The period date returned will be based on the first prefix in the set. The mask may consist of a set of literal characters and/or wildcard characters that identify the set of prefixes to consolidate. A percent symbol (%) is a wildcard representing any number of characters. An underscore (_) is a wildcard representing a single character.
Example: "1-1%"
List of PrefixesIndicates a comma-separated list of prefixes enclosed in parenthesis. The period date returned will be based on the first prefix in the set.
Example: "('1-10','1-11','1-21','1-40')"
Range of CellsProduces the same result as List of Prefixes except that the list is built automatically based on the values in the cells that make up the range.
Example: $G$3:$G$10
NOTE - If fiscal settings are global (not stored by prefix), this argument is ignored. Also, although a full prefix may be specified, the period date will only be returned from the prefix that is the fiscal entity level.
FiscalYearOptional - This argument identifies the fiscal year for which the period date should be returned.
BlankReturns the period date for the current fiscal year.
Four-Digit YearThe period date will be returned for the fiscal year specified.
FiscalPeriodOptional - This argument identifies the fiscal period for which the period date should be returned.
BlankReturns the period date for the current fiscal periods of 1 - 12 or 13 if using 13 period accounting.
Four-Digit YearThe period date will be returned for the fiscal year and fiscal period specified.
DateTypeOptional - This argument specifies the type of period date to return. This may be one of the following values:
  • PeriodBegin (default if no DateType is specified)
  • PeriodEnd
  • YearBegin
  • YearEnd
  • CurrentPeriodBegin (FiscalYear and FiscalPeriod arguments will be ignored)
  • CurrentPeriodEnd (FiscalYear and FiscalPeriod arguments will be ignored)
  • CurrentYearBegin (FiscalYear and FiscalPeriod arguments will be ignored)
  • CurrentYearEnd (FiscalYear and FiscalPeriod arguments will be ignored)
DataFoldersOptional - If blank or not specified, the current data folder will be used. Possible values include:
BlankCurrent data folder (associated with the workbook) will be used.
Data Folder PathSpecifies a specific data folder.
Range of CellsWhere each cell in the range identifies a data folder path. In this case, data folders that do not contain the requested prefix(es) are ignored. All other data folders must return the same fiscal year or else an error message will be returned..