Calculates the difference, in years, between two date expressions.
Age(Date-expression1 | DateTime-expression1 [ ,Date-expression2 | DateTime-expression2 ] )
Type returned:
Numeric(4)
Objects: Procedure, Data Provider, Transaction, Web Panel,
Panel
Generators: .NET, .NET Framework, Java, Apple, Android,
Angular
Returns the difference, in years, between the two parameters (second parameter - first parameter). If the second parameter, which is optional, is omitted, then the default value depends on the first parameter’s data type:
1. If it is Date type, then the default value is the value returned by the Today function.
2. If it is DateTime type, then the default value is the value returned by the Now function.
If the first parameter is prior to the second one, then Age function returns a positive value; otherwise, it returns a negative value.
&Nbr = Age(&DateOfBirth)
Age method