itx()

Read(7) Label: time interval constant,

Description:

Generate a time interval constant according to the specified time component(s).

Syntax:

itx(s,d,m)

Note:

The function performs an operation according to the specified time component(s), which can be second, day or month and generates a time interval constant.

 

Only three time components are supported. They are itx(s), itx(,d) and itx(,d,m).

Parameter:

s

Second. When this parameter is absent, retain the comma between parameter d.

d

Day.

m

Month.

Return value:

Time interval constant

Example:

 

A

 

1

=itx(,1)

Return a time interval constant:

It represents 1 day.

2

=addx(date("2025-01-01"),A1)

2025-01-02

3

=itx(,2,3)

Return a time interval constant representing three months and 2 days.

4

=addx(datetime("2025-01-01 01:10:30"),A3)

2025-04-03 01:10:30

5

=itx(600)

Return a time interval constant representing 10 minutes.

6

=addx(datetime("2025-01-01 01:10:30"),A5)

2025-01-01 01:20:30

7

=cmpx(subx(date("2025-12-14"),date("2025-9-12")),itx(,2,3))

Find whether the number of days between 2025-12-14 and 2025-9-12 is greater than 3 months and 2 days. The returned result being 0 means that they are equal.