Skip to main content

PQL46 (PQL Function Library - CPM 4.6)

ADD_HOURS

Applies to: CELONIS 4.0 CELONIS 4.2 CELONIS 4.3 CELONIS 4.4 CELONIS 4.5 CELONIS 4.6

Description

ADD_HOURS adds a given number of hours to a given date.

Supported input column types: base_column -> DATE, hours_column -> INT

Output column type: DATE

Syntax
ADD_HOURS ( table.base_column, table.hour_column )
NULL handling

If any parameter is NULL, the result is NULL as well.

Example

[1] Simple example for ADD_HOURS.

Query

Column1

ADD_HOURS ( "Table1"."Base_Column" , "Table1"."Hours_Column" )

Input

Output

Table1

Base_Column : DATE

Hours_Column : INT

Mon Jan 01 2018 00:00:00.000

24

Mon Jan 01 2018 00:00:00.000

1

Mon Jan 01 2018 00:00:00.000

0

Mon Jan 01 2018 00:00:00.000

-1

Result

Column1 : DATE

Tue Jan 02 2018 00:00:00.000

Mon Jan 01 2018 01:00:00.000

Mon Jan 01 2018 00:00:00.000

Sun Dec 31 2017 23:00:00.000