Date Functions
Refer to the following table to find the function of your choice. The functions are listed in alphabetical order.
Function |
Explanation |
ALERT_BDATE() |
|
ALERT_EDATE() |
|
BUCKET_BDATE() |
|
BUCKET_DATE_IN() |
|
BUCKET_DAYS() |
|
BUCKET_EDATE() |
|
BUCKET_FISCAL_PERIOD() |
|
BUCKET_WDAYS() |
|
CALENDAR_WDAYS() |
|
DATE() |
DATE( YYYYMMDD ) returns the integer value which corresponds to the number of days between 0001/01/01 and the specified date. You enter the date YYYYMMDD in the format YYYYMMDD in an Operator/function dialog box. For example, DATE( 19990101 ) = 729756. Use this function in order to include a fixed, known date in a macro. |
DATE_TO_CHAR () |
Syntax DATE_TO_CHAR ( Number of days ) Number of days: Number of days since 0001/01/01. Description DATE_TO_CHAR () returns the date as a string. The function calculates the date starting at 0001/01/01 and adding the Number of days. The system uses the date format that is saved in user master data. |
DAY() |
DAY( X ) returns the day in a date that is expressed in whole numbers with reference to the date 0001/01/01. Example: DAY( DATE( 19990220)) = 20. The argument can either be a number you enter in an Operator/Function dialog box or one of the macro elements cell, row, or column from the planning table or auxiliary table. |
FISCAL_BDATE() |
|
FISCAL_EDATE() |
|
FISCAL_PERIOD() |
FISCAL_PERIOD(X) returns the number of the posting period specified by column X. |
FISCAL_YEAR |
FISCAL_YEAR (X) returns the fiscal year of the period specified by column X. |
MONTH() |
MONTH( X ) returns the month in a date that is expressed in whole numbers with reference to the date 01/01/0001. Example: MONTH( DATE( 19990220 )) = 2. The argument can either be a number you enter in an Operator/Function dialog box or one of the macro elements cell, row, or column from the planning table or auxiliary table. |
MONTH_BDATE() |
|
MONTH_EDATE() |
|
PRODUCT_PHIN_END or PRODUCT_PHIN_END() |
|
PRODUCT_PHIN_START or PRODUCT_PHIN_START() |
|
PRODUCT_PHOUT_END or PRODUCT_PHOUT_END() |
|
PRODUCT_PHOUT_START or PRODUCT_PHOUT_START() |
|
QUARTER() |
Syntax QUARTER ( Number of days ) Number of days: Number of days since 0001/01/01. Description |
QUARTER_BDATE() |
Syntax QUARTER_BDATE ( Number of days ) Number of days: Number of days since 0001/01/01. Description |
QUARTER_EDATE() |
Syntax QUARTER_EDATE ( Number of days ) Number of days: Number of days since 0001/01/01. Description |
SEASON_BDATE |
Syntax SEASON_BDATE ( Column ) Column: Row, column, or cell element (data source = column attributes) Description The SEASON_BDATE function determines the start date of a season if all the characteristic values combinations selected for the planning object have the same start date. |
SEASON_EDATE |
Syntax SEASON_EDATE ( Column ) Column: Row, column, or cell element (data source = column attributes) Description The SEASON_EDATE function determines the end date of a season if all the characteristic values combinations selected for the planning object have the same end date. |
TIMESHIFT_BACKWARDS() |
Syntax TIMESHIFT_BACKWARDS( <’E’;> Area 1 ; Area 2 ) 'E': optional parameter for controlling the behavior at the end of the period Area 1: Name of the area that contains the data to be moved Area 2:Name of the area that contains the offsets The two areas should have the same length and consist of only one line. Description TIMESHIFT_BACKWARDS() moves the values of the time series in area 1 back by the number of periods specified in area 2. If you set the optional parameter 'E', values that are moved back beyond the first period in area 1, are either lost or are added to the first period. For example: the time series look like this: Area 1 10 20 30 40 50 Area 2 1 2 1 3 1. The result looks like this if parameter E was set: Results 40 30 0 50 0 If E is not set, the result is as follows: |
TIMESHIFT_FORWARDS() |
Syntax TIMESHIFT_ FORWARDS ( <’E’;> Area 1 ; Area 2 ) 'E': optional parameter for controlling the behavior at the end of the period Area 1: Name of the area that contains the data to be moved Area 2:Name of the area that contains the offsets The two areas should have the same length and consist of only one line. Description TIMESHIFT_FORWARDS() moves the values of the time series in area 1 forward by the number of periods specified in area 2. If you set the optional parameter 'E', values that are moved forward beyond the last period in area 1, are either lost or are added to the last period. |
TODAY |
TODAY returns today's date in integer format with reference to the date 0001/01/01. For example, you can use this function as the argument of another function: DAY ( TODAY ) WEEK ( TODAY ) MONTH ( TODAY ) PRODUCT_LIFE ( TODAY ) WEEKDAY ( TODAY ) WEEK_BDATE( TODAY ) WEEK_EDATE( TODAY ) YEAR ( TODAY ) YEAR_BDATE( TODAY ) YEAR_EDATE( TODAY ) |
WEEK() |
WEEK( X ) returns the week in a date X that is expressed in whole numbers with reference to the date 0001/01/01. Example: WEEK( DATE( 20001220)) = 51. The argument can either be a number you enter in an Operator/Function dialog box or one of the macro elements cell, row, or column from the planning table or auxiliary table. |
WEEK_BDATE() |
WEEK_BDATE( X ) returns the start date of the week in which the specified day X falls. For example, if today's date is Wednesday, December 20th in the year 2000, WEEK_BDATE( TODAY ) returns 20001218. |
WEEK_EDATE() |
WEEK_EDATE( X ) returns the end date of the week in which the specified day X falls. For example, if today's date is Wednesday, December 20th in the year 2000, WEEK_EDATE( TODAY ) returns 20001224. |
YEAR_BDATE() |
YEAR_BDATE( X ) returns the start date of the year in which the specified day X falls. For example, if today's date is Wednesday, December 20th in the year 2000, YEAR_BDATE( TODAY ) returns 20000101. |
YEAR_EDATE() |
YEAR_EDATE( X ) returns the end date of the year in which the specified day X falls. For example, if today's date is Wednesday, December 20th in the year 2000, YEAR_EDATE( TODAY ) returns 20001231. |
WEEKDAY() |
WEEKDAY( X ) returns as a number between 1 and 7 the weekday of a date that is expressed in integer format with reference to the date 0001/01/01, where 1 = Monday and 7 = Sunday. For example, for January 20th 1999 WEEKDAY( DATE( 19990120 ) ) returns 3. The argument can be either a number that you enter in an Operator/function dialog box, or one of the macro elements cell, row or column from the planning table or the auxiliary table. |
YEAR() |
YEAR( X ) returns the year of a date that is in whole numbers with reference to the date 0001/01/01. Example: For January 20th 1999 YEAR( DATE( 19990120 ) ) returns 1999. The argument can be either a number that you enter in an Operator/function dialog box, or one of the macro elements cell, row or column from the planning table or the auxiliary table. |