Skip to main content

PQL47 (PQL Function Library - CPM 4.7)

ROUND_YEAR

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

Description

This function rounds a DATE input down to the year by setting its MONTH, DAY, HOUR, MINUTE, SECOND and MILLISECOND values to their ground state.

Syntax
ROUND_YEAR ( table.date_column )
NULL handling

If the input value is NULL, then the result is NULL as well.

Example

[1] Round dates down to the year.

Query

Column1

ROUND_YEAR ( "Table1"."Date" )

Input

Output

Table1

Date : DATE

Mon May 08 2006 23:59:59.999

Fri Dec 31 1999 23:59:59.999

Fri Jan 01 2016 00:59:59.000

Sat Jan 01 1994 00:00:00.000

null

Result

Column1 : DATE

Sun Jan 01 2006 00:00:00.000

Fri Jan 01 1999 00:00:00.000

Fri Jan 01 2016 00:00:00.000

Sat Jan 01 1994 00:00:00.000

null