Spread 8.0 Documentation
SSGetTwoDigitYearMax, SSSetTwoDigitYearMax Functions
Support Options
DLL Reference > DLL Functions > SSGetTwoDigitYearMax, SSSetTwoDigitYearMax Functions

Glossary Item Box

SSGetTwoDigitYearMax, SSSetTwoDigitYearMax Functions


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Set or return the year value used to calculate the century for two-digit year values.

Syntax

C

short SSGetTwoDigitYearMax(HWND hWnd);

BOOL SSSetTwoDigitYearMax(HWND hWnd, short nTwoDigitYearMax);

C++

short TSpread::GetTwoDigitYearMax( );

BOOL TSpread::SetTwoDigitYearMax(short nTwoDigitYearMax);

Parameters

The SSGetTwoDigitYearMax function has the following parameter:

Parameter Description
hWnd Window handle of the fpSpread control

The SSSetTwoDigitYearMax function has the following parameters:

Parameter Description
hWnd Window handle of the fpSpread control
nTwoDigitYearMax Sets the four-digit year value being used to calculate the century

Remarks

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

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

The default value used for calculations 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.

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 by calling the SSSetTypeDate function.

Return Value

SSGetTwoDigitYearMax: Returns the year value being used to calculate century values. The year returned is a four-digit year.
SSSetTwoDigitYearMax: TRUE if the function completes successfully; FALSE otherwise.

See Also

Creating and Setting up a Date Cell

SSSetTypeDate function

ActiveX Correspondence

TwoDigitYearMax property

Copyright © GrapeCity, inc. All rights reserved.