SSpread.TypeDateFormat Property
Set the date display format in a date type cell.
Valid only for cells with the CellType property set to $CellTypeDate (date type). Before setting this property, use the Col , Row properties etc. to specify what you want to do.
Specify the following values. The initial value is the setting value of the OS.
| Constant | Value | Example ( 2011年5月24日 ) |
|---|---|---|
| $TypeDateFormatDDMONYY | 0 | 24 / May / 2011 |
| $TypeDateFormatDDMMYY | 1 | 24/05/2011 |
| $TypeDateFormatMMDDYY | 2 | 05/24/2011 |
| $TypeDateFormatYYMMDD | 3 | 2011/05/24 |
| $TypeDateFormatYYMM | 4 | 2011/05 |
| $TypeDateFormatMMDD | 5 | 05/24 |
| $TypeDateFormatGEEMMDD | 6 | H23/05/24 |
| $TypeDateFormatGGEEMMDD | 7 | 平23/05/24 |
| $TypeDateFormatGGGGEEMMDD | 8 | 平成2011/05/24 |
| $TypeDateFormatDefault | 99 | Returns to the initial value. (For setting only) |
The number of digits in the Christian era ( 2 digits, 4 digits) is set by the TypeDateCentury property.
The year / month / day delimiter is set with the TypeDateSeparator property.
This property is subject to property inheritance for date cells.
Example of use
Col = 3;
Row = 2;
CellType = $CellTypeDate;
TypeDateFormat = $ TypeDateFormatGGGGEEMMDD;
Value = str(sysdate(), "YYYYMMDD");
BlockMode = $ TRUE;
Col = 3;
Row = 3;
Col2 = 5;
Row2 = 5;
CellType = $CellTypeDate;
TypeDateFormat = $TypeDateFormatDDMONYY;
Value = str(sysdate(), "YYYYMMDD");
BlockMode = $FALSE;
Related item
CellType , TypeDateCentury , TypeDateSeparator properties