Spread 8.0 Documentation
TwoDigitYearMax Property
Support Options
ActiveX Reference > ActiveX Properties > TwoDigitYearMax Property

Glossary Item Box

TwoDigitYearMax Property


See Also    DLL    Example

Applies To

fpSpread control

Description

Sets or returns the year value used to calculate the century for two-digit year values.

Syntax

C++

short CSpreadSheet::GetTwoDigitYearMax( );
void CSpreadSheet::SetTwoDigitYearMax(short value);

Visual Basic

[form.]fpSpread.TwoDigitYearMax[ = value%]

Remarks

The control determines the century value for two-digit years by placing the year in the range between the value of this property and the value of this property minus 99 years. To change the calculation year, provide a four-digit value.

The default value for the TwoDigitYearMax property is 2059, which specifies that centuries are calculated as falling within the range between the year 1960 (2059 minus 99) and the year 2059, inclusive. For example, if the user provides a date with the year value 63, the control would interpret that year as the year 1963, because 1963 falls between 1960 and 2059.

This setting is applied to the entire workbook, including all sheets in the control.

Tip: For best results, prompt your user for and represent dates with four-digit year values. Four-digit year values eliminate possible misunderstanding of year data.

The maximum year you can specify for the calculation year is 9999. The minimum year you can specify for the calculation year is 1100.

You can specify whether date cells display the century for date values using the TypeDateCentury property.

Spread Designer

Choose the Book menu, then the Environment menu, select the Environment tab, and then type or select a number from the Pivot Year spin box in the Book Settings dialog box.

Data Type

Integer

See Also

Creating and Setting up a Date Cell

TypeDateCentury property

DLL Correspondence

SSGetTwoDigitYearMax, SSSetTwoDigitYearMax functions

Copyright © GrapeCity, inc. All rights reserved.