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

Glossary Item Box

TypeDateFormat Property


See Also    DLL    Example

Applies To

fpSpread control

Description

Sets or returns the format used to display the date in a date cell. This property is available at run time only.

Syntax

C++

long CSpreadSheet::GetTypeDateFormat( );
void CSpreadSheet::SetTypeDateFormat(long value);

Visual Basic

[form.]fpSpread.TypeDateFormat[ = setting%]

Remarks

The following settings are available:

Setting Example Constant
0 - DDMONYY 15/NOV/95 TypeDateFormatDDMONYY
1 - DDMMYY 15/11/95 TypeDateFormatDDMMYY
2 - MMDDYY 11/15/95 TypeDateFormatMMDDYY
3 - YYMMDD 95/11/15 TypeDateFormatYYMMDD
99 - Default Resets to use the Date Format setting in the Windows Control Panel TypeDateFormatDefault

The default value for the TypeDateFormat property is the value in the Date Format setting in the Windows Control Panel.

Note: The control does not recognize changes made to the Windows regional settings or options until you restart your development environment or your application (or perform any operation that unloads and reloads the current control files). For more information about regional settings or options and Windows operating environments, see Variations in Windows Regional Settings or Options.

To specify to display four-digit year values, set the TypeDateCentury property to True.

To use the TypeDateFormat property, specify the sheet with which you want to work by setting the Sheet property. Then specify the cell or cells to which to apply the property, as described in Using Column and Row Properties. Once you set the TypeDateFormat property for a cell or cells, any subsequent date cells you create will use the same TypeDateFormat setting unless you reset it for those cells.

The TypeDateFormat property does not have an effect unless the CellType property is set to 0 (Date) for the specified cell or cells.

Note: If your date cell format displays only two-digit years, the control makes an assumption about the four-digit year value that corresponds to the displayed two-digit year value every time the century value is needed. If you choose not to provide four-digit year values and instead let the fpSpread control assume a century value, be aware that the control might extrapolate the century value using the method specified by the TwoDigitYearMax property or assume the value is Null. You must check the resulting century value to ensure it is the value you intend.

Spread Designer

Choose the Cell menu, the Cell Type menu, the Date menu, and then the Settings tab, and then select an item in the Format drop-down list box in the Cell Type Settings dialog box.

Data Type

Integer (Enumerated)

See Also

Variations in Windows Regional Settings or Options
Formatting a Date Cell

CellType, Sheet, TypeDateCentury, TypeDateSeparator properties

DLL Correspondence

SSSetTypeDate function

Copyright © GrapeCity, inc. All rights reserved.