ジャンプ先: 概要. 戻り値. キーワード. フラグ. MEL 例.

概要

date [-date] [-format string] [-shortDate] [-shortTime] [-time]

date は、取り消し不可能照会不可能、および編集不可能です。

現在のタイムと日付の情報を返します。定義済みフォーマットまたは -format フラグで出力フォーマットを指定します。

戻り値

string

キーワード

time, date

フラグ

date, format, shortDate, shortTime, time
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
-time(-t) create
現在のタイムを返します。フォーマットは hh:mm:ss です。
-shortTime(-st) create
現在のタイムを返します。フォーマットは hh:mm です。
-date(-d) create
現在の日付を返します。フォーマットは YYYY/MM/DD です。
-shortDate(-sd) create
現在の日付を返します。フォーマットは MM/DD です。
-format(-f) string create
日付と時間の表示方法を定義する文字列を指定します。以下のキーワードの出現場所は、すべて対応する値に置換されます。 YYYYYYMMDDhhmmss
キーワード置換後
現在の年(4 桁)
現在の年(下 2 桁)
現在の月。該当する場合、先頭に 0 が追加されます。
現在の日。該当する場合、先頭に 0 が追加されます。
現在の時間。該当する場合、先頭に 0 が追加されます。
現在の分。該当する場合、先頭に 0 が追加されます。
現在の秒。該当する場合、先頭に 0 が追加されます。

フラグはコマンドの作成モードで表示できます フラグはコマンドの編集モードで表示できます
フラグはコマンドの照会モードで表示できます コマンド内でフラグを複数回使用できます。

MEL 例

// Get the current date and time
date;
// Result:2006/03/09 16:50:24//
// Get only the month and day
date -shortDate;
// Result:03/09//
// Get the date and time in a fancy format
date -format "Year is YY (or YYYY), month is MM, day is DD. And it is now hh:mm:ss";
// Result:year is 06 (or 2006), month is 03, day is 09. And it is now 16:53:20//