monthNum

monthNum, function

def const dash pure monthNum(d: date): number

Returns the month number (1 to 12) for d.

Examples

table T = with
  [| as D |]
  [| date(2020, 1, 1) |]
  [| date(2020, 6, 15) |]
  [| date(2020, 12, 31) |]

show table "Month number" with
  T.D
  monthNum(T.D) as "Month"

This produces the following table:

D Month
2020-01-01 1
2020-06-15 6
2020-12-31 12

See also

User Contributed Notes
0 notes + add a note