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

Description

CALENDAR_WEEK returns the calendar week of a given date. Celonis follows the standard ISO 8601 for numbering the calendar weeks.

The standard defines Monday as the first day of the week and the first week of the year as the one with the 4th of January.

Supported input column types: DATE

Output column type: INT

Syntax

CALENDAR_WEEK ( table.column )

Null handling

If any parameter is NULL, the result is NULL

Example


[1] This example shows in which calendar week the 1st of January is depending on the weekday. The 1st of January 2018 is a Monday, 2019 it is a Tuesday, 2014 Wednesday and so on. If the 1st of January is Friday, Saturday or Sunday the week still "belongs" to the previous year.

Query
Column1
CALENDAR_WEEK ( "Table1"."Column1" )
Input
Table1
Column1 : DATE
Mon Jan 01 2018 00:00:00.000
Tue Jan 01 2019 00:00:00.000
Wed Jan 01 2014 00:00:00.000
Thu Jan 01 2015 00:00:00.000
Fri Jan 01 2016 00:00:00.000
Sat Jan 01 2022 00:00:00.000
Sun Jan 01 2017 00:00:00.000
Output
Result
Column1 : INT
1
1
1
1
53
52
52


  • No labels