Add and subtract basic datetime values
- Last Updated: December 3, 2025
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
You can use the addition (+) and subtraction
(-) operators with datetime values to obtain results that
are defined according to the operation and its operands. So, with
the addition operator, you can add milliseconds to a datetime value
using the following syntax:
Syntax
|
|
The result is a different DATETIME or DATETIME-TZ value,
respectively.
Syntax
With the subtraction operator, you can subtract milliseconds from a datetime value or subtract a compatible datetime value from a another datetime value using the following syntax:
|
|
The result is either a different DATETIME or DATETIME-TZ value (when
subtracting milliseconds) or a millisecond interval between
two DATETIME or DATATIME-TZ values
returned as an INT64.