Skip to main content

Celonis Product Documentation

ROUND_WEEK
Description

This function rounds a DATE input down to the week by setting its HOUR, MINUTE, SECOND and MILLISECOND values to their ground state. The DAY value is set to the Monday of the week of that date.

Syntax
 ROUND_WEEK ( 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 week:

Query

Column1

         ROUND_WEEK ( "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

Fri Jan 01 1993 00:00:00.000

null

Result

Column1 : date

Mon May 08 2006 00:00:00.000

Mon Dec 27 1999 00:00:00.000

Mon Dec 28 2015 00:00:00.000

Mon Dec 28 1992 00:00:00.000

null