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 VAX
HP OpenVMS Alpha
HP OpenVMS Itanium

Goal

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.

Solution

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