日付型セルで、日付の表示書式を設定します。
CellTypeプロパティに$CellTypeDate(日付型)が設定されたセルのみ有効です。
このプロパティを設定する前に、Col、Rowプロパティなどを使用して処理の対象を指定します。
以下の値を指定します。初期値はOSの設定値です。
|
定数 |
値 |
例(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 |
平成23/05/24 |
|
$TypeDateFormatDefault |
99 |
初期値に戻します。(設定専用) |
西暦の桁数(2桁、4桁)は、TypeDateCenturyプロパティで設定します。
年月日の区切り文字は、TypeDateSeparatorプロパティで設定します。
このプロパティは日付型セルのプロパティ継承の対象です。
使用例
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;
関連項目
CellType、TypeDateCentury、TypeDateSeparatorプロパティ