datatable.time.month()

Added in version 1.0.0

Retrieve the “month” component of a date32 or time64 column.

Parameters

date
FExpr[date32] | FExpr[time64]

A column for which you want to compute the month part.

return
FExpr[int32]

The month part of the source column.

Examples

DT = dt.Frame([1, 1000, 100000], stype='date32') DT[:, {'date': f[0], 'month': dt.time.month(f[0])}]
datemonth
date32int32
01970-01-021
11972-09-279
22243-10-1710

See Also

  • year() – retrieve the “year” component of a date

  • day() – retrieve the “day” component of a date