Add and subtract days plus milliseconds with a datetime value
- Last Updated: December 3, 2025
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
You can add or subtract days and milliseconds together
with a datetime value using a combination of ABL functions, depending
the data type (DATETIME or DATETIME-TZ). This
is the syntax for adding or subtracting a specific number of days
and milliseconds with a DATETIME:
Syntax
|
The new-datetime value then represents a new DATETIME at
a point later (when adding to) or earlier (when subtracting from)
the old-datetime value by the specified number
of days and milliseconds.
This is the syntax for adding or subtracting a specific number
of days and milliseconds with a DATETIME-TZ:
Syntax
|
The new-datetime-tz value then represents
a new DATETIME-TZ at a point later (when adding
to) or earlier (when subtracting from) the old-datetime-tz value
by the specified number of days and milliseconds within the specified
time zone.