version 6.0
Add to date (date; years; months; days) 日付
| 引数 | 型 | 説明 | |
| date | 日付 | 年月日を加算する日付 | |
| years | 数値 | 日付に加算する年 | |
| months | 数値 | 日付に加算する月 | |
| days | 数値 | 日付に加算する日 | |
| 戻り値 | 日付 | 結果の日付 |
説明
Add to date コマンドは、dateにyears、months、days を加算し、その結果の日付を返します。
通常、任意の日付に日を追加する場合、日付演算子を使用しますが、Add to dateは(+ 日付 演算子を使用する場合のように)1ケ月の日数やうるう年の取り扱い方法を気にすることなく月や年を素早く加算することができます。
例題
` この行は、現在の月日の一年後の日付を計算しいます $vdInOneYear:=Add to date(Current date;1;0;0) ` この行は、現在の日付の来月を計算しいます $vdNextMonth:=Add to date(Current date;0;1;0) ` この行は$vdTomorrow:=Current 日付+1と同等です $vdTomorrow:=Add to date(Current date;0;0;1)
参照