Adds hours to a datetime.

DateTime = SRP_DateTime("AddHours", Datetime, Hours)

Returns

A new datetime.

Parameters

ParameterDescription
DatetimeA datetime in OI internal format. (REQUIRED)
HoursThe number of hours to add. (REQUIRED)

Remarks

The "AddHours" service calculates a new datetime by adding the given number of hours to an existing datetime. You can pass whole numbers or decimal numbers. You can also pass negative values to subtract hours.

Examples

// Add 10 hours the current datetime
NewDateTime = SRP_DateTime("AddHours", DateTime(), 10)

// Add an hour and a half to the current datetime
NewDateTime = SRP_DateTime("AddHours", DateTime(), 1.5)

// Subtract 10 hours from the current datetime
NewDateTime = SRP_DateTime("AddHours", DateTime(), -10)

  • No labels