Description:
Perform addition operation on parameters.
Syntax:
addx(t,k)
Note:
The function performs addition operation on parameters.
When t is a date/datetime value and k is a numeric value, k represents the number of days.
When t and k are of the other data types, perform the addition operation.
Parameter:
|
t |
A date/time/datetime/numeric value. |
|
k |
A time interval constant/numeric value. |
Return value:
Date/time/datetime/numeric
Example:
|
|
A |
|
|
1 |
=addx(date("2025-01-10"),10) |
Compute the date by adding 10 days beginning from 2025-01-10 and return 2025-01-20. |
|
2 |
=addx(datetime("2025-01-10 12:01:22"),-5) |
Compute the datetime by subtracting 10 days from 2025-01-10 12:01:22 and return 2025-01-05 12:01:22. |
|
3 |
=addx(time("12:01:22"),itx(30)) |
Compute the time by adding 30 seconds from 12:01:22 and return 12:01:52. |
|
4 |
=addx(date("2025-01-10"),itx(,4,3)) |
Compute the date by adding three months and four days beginning from 2025-01-10加3个月 and 2025-04-14. |
|
5 |
=addx(5,8) |
Compute 5 plus 8 and return 13. |