Functions and operators : ADD_HOUR( )

ADD_HOUR( )

Adds a specified number of hours to a date value.

Syntax

ADD_HOUR(date, hoursToAdd)

Arguments

date

The date or date expression representing the start date. If a start date does not have a time value, the function assumes the time is midnight, 12:00 AM.

hoursToAdd

The number of hours to add to the start date. If you specify a negative number, the result is as if the number is subtracted from the start date.

Returns

The date-and-time value that results from adding the specified number of hours to the start date.

Example

The following example adds eight hours to each date value in the ShipDate data field.

ADD_HOUR([ShipDate], 8)