Contents

Roo

DateTime.add_hours()

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

datetime.add_hours(hours As Number) as DateTime

Parameters

  • hours. Number. The number of hours 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_hours(5)
print(d) # Oct 26th 1985 07:20:00 AM