Built-in Functions → addHours

addHours() is a scalar date function that returns the sum of a date value and a specified number of hours, in which the integer number (+/-) of hours added to a given date is in the format "yyyy-MM-dd".

Signature

addHours(date exp, int hours)

The following table illustrates the addHours() parameters:

ParameterDescription
date expdate to add hours to
int hoursint hours to add to date exp

Returns

date

Example

Add 36 hours to the dates in TIME_ID.

addHours(Sales_Acme.Sales.TIME_ID, 36)