Date.DaysInMonth

語法

Date.DaysInMonth(dateTime as any) as nullable number

關於

傳回 date、datetime 或 datetimezone 值 dateTime 中的當月天數。

  • dateTime:已傳回當月天數的 date、datetime 或 datetimezone 值。

範例

#date(2011, 12, 01) 所表示的 12 月的天數。

使用方式

Date.DaysInMonth(#date(2011, 12, 01))

輸出

31