Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

MonthName

指定された月を示す文字列を返します。

Synopsis

MonthName(month[,abbreviate])

引数

month 月を示す数値。例えば、1 月は 1、2 月は 2 などです。
abbreviate オプション — 月名を略記するかどうかを示すブーリアン値。これを省略すると、既定値の False (0) になり、月名は略記されません。

以下の例は MonthNameMonth 関数を使用して、日付式で月名を返します。

Dim MName
Mydate = "1/12/1953"
MName = MonthName(Month(Mydate))
Println MName

以下の例は MonthNameDate 関数を使用して、現在の日付の略記の月名を返します。

Dim MName
CurrDate = Date
MNum = Month(CurrDate)
MName = MonthName(MNum,1)
Println MName

以下の例では、月数が 1 から 12 の範囲外なので MonthName は疑問符を返します。

Dim MyVar
MyVar = MonthName(13)
Println MyVar

関連項目

FeedbackOpens in a new tab