Contents

Roo

DateTime.add_months()

Creates and returns a new DateTime object by adding the specified number of months to this DateTime object. This DateTime object is unaltered by the operation.

datetime.add_months(months As Number) as DateTime

Parameters

  • months. Number. The number of months to add to this DateTime object

Returns

  • A new DateTime object

Example

var bttf = DateTime(499137600) # Oct 26th 1985 01:20:00 AM.
var d = bttf.add_months(2)
print(d) # Dec 26th 1985 01:20:00 AM