RDBPROD: Date Arithmetic to Calculate Age in Years and Months

(Doc ID 65210.1)

Last updated on AUGUST 03, 2016

Applies to:

Oracle Rdb Server on OpenVMS - Version 6.1 and later
HP OpenVMS Alpha
HP OpenVMS Itanium


Rdb date arithmetic operates on year and month portions.  Thus, performing the following SQL query yields the following:

The following example illustrates how to work around this restriction and return the correct age in years and months.


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms