add-hours-to-dateTime

Adds the specified number of hours to a given date and time.

Syntax

    add-hours-to-dateTime(strDateTime1, hours)

Parameters

strDateTime1 is a string that represents the date and time and is specified in the format yyyy-mm-ddThh:mm:ssZ. For more information about date and time parameters, see Date and time parameters.

hours is a number that holds the number of hours to add to the given date and time. A negative number for hours subtracts hours from the given date and time.

Returns

A string value in the format yyyy-mm-ddThh:mm:ssZ.

Example

The following expression returns a string value of 1999-11-28T03:12:00Z:

add-hours-to-dateTime("1999-11-28T11:12:00Z",-8)

// Ethnio survey code removed