DateAdd

ページ名:DateAdd
  • DateAdd


 
Result = DateAdd ( Date as Date , Period AS Integer , Count AS Integer ) AS Date

特定の日付に特定の期間を追加します。

  1. 日付は最初の日付です。
  2. 期間は期間の種類です。年、月、日、週...
  3. Countは追加する期間の数です。

結果の日付が返されます。

期間は、次の定数のいずれかになります。

Constant

Effect
gb.Second Adds seconds.
gb.Minute Adds minutes.
gb.Hour Adds hours.
gb.Day Adds days.
gb.Week Adds weeks.
gb.WeekDay Adds week days (ignore Saturday and Sunday).
gb.Month Adds months.
gb.Quarter Adds quarters.
gb.Year Adds years.

Examples

Dim date1 As Date = Date(1972, 09, 06, 1, 45, 0)
Dim date2 As
Date = DateAdd(date1, gb.Minute, 45)
Print date1, date2
06.09.1972 01:45:00 06.09.1972 02:30:00

See also

シェアボタン: このページをSNSに投稿するのに便利です。

コメント

返信元返信をやめる

※ 悪質なユーザーの書き込みは制限します。

最新を表示する

NG表示方式

NGID一覧