Skip to main content

Celonis Product Documentation

DAYS_BETWEEN
Description

DAYS_BETWEEN computes the difference between two dates in days.

Supported input column types: DATE

Output column type: FLOAT

Syntax
 DAYS_BETWEEN ( table.column1, table.column2 )
NULL handling

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

Use Cases
Example

[1]

Simple DAYS_BETWEEN example.

Query

Column1

         DAYS_BETWEEN ( "Table1"."Column1" , "Table1"."Column2" )
        

Input

Output

Table1

Column1 : date

Column2 : date

Fri Dec 31 1999 23:59:59.000

Fri Dec 31 1999 23:59:59.000

Fri Dec 31 1999 23:59:59.000

Sun Jan 02 2000 00:01:02.000

Sun Jan 02 2000 00:01:02.000

Fri Dec 31 1999 23:59:59.000

Fri Dec 31 1999 23:59:59.000

Sat Jan 01 2000 12:01:00.000

Fri Dec 31 1999 23:59:59.000

Tue Jan 04 2000 00:00:00.000

Sat Jan 01 2000 12:01:00.000

Tue Jan 04 2000 00:00:00.000

Result

Column1 : float

0.0

1.0

-1.0

0.5

3.0

2.5

See also: