monthofyear()

指定した年の月数を表す 1 ~ 12 の整数を返します。

monthofyear()関数と getmonth() 関数は同等です

構文

monthofyear(date)

構文規則について詳しく知る。

パラメーター

名前 必須 説明
date datetime ✔️ 月番号を検索する日付。

戻り値

指定された年の月数を表す 1 ~ 12 の整数。

print result=monthofyear(datetime("2015-12-14"))

出力

結果
12