Age (PQL)
Returns the number of years between the date column and today
- Returned Output: Integer
- Library: PQL \ Granular \ Date-Time
- Version: 2023.00.000
- Compatibility: Pyramid Query Language (PQL) data sources
Syntax
* Click on the function’s arguments above for more details on the input values.
Comments
- The input column needs to be an attribute with date-time values in the model. (The data type needs to be ‘date-time’)
- The function is a shortcut that can be achieved with a combination of other functions
- For details on how to employ and use this function see the custom column overview.
Different Function types
- As a granular function, it is used in the base SQL query itself.
- Also see the DateDiff and Today functions.
Examples
This example returns a column with the number of years between the current date and the date in the input column (order date).
In the example below, the 3rd column represents the number of years between the current date and the Order date (column 1).
