You may need to resolve a person's age based on their birthdate, or to calculate their age on a specific date. Slate provides pre-built exports and filters for querying both of these data points, with no need to create custom fields, exports, or filters. These calculations are:
- Current Age Based on Birthdate
- Age (as of date)
Current Age Based on Birthdate
The most commonly used of the two filters is the Current Age Based on Birthdate. This export/filter refers to the person's birthdate and displays the person's age at the current time. For instance, if a person was born on 09/04/1995, that person's age will appear as 25 on on 08/01/2021.
Age (as of date)
An additional capability in Slate allows displaying a person's age as of a particular date in the past, present, or future. For instance, if a person was born on 09/04/1995, on 08/01/2021, that individual is 25 years old. To display the person's age on 01/01/2022, use this filter and provide the desired as-of date. In this example, entering 01/01/2022 as the as-of date shows that the person's age on that date is 26 years old.
Age (as of date) - With a Dependent Subquery
If you would like to also display the specific as-of date along with the person's age in years? A subquery export can be added that includes the Age (as of date) and a literal (static text) to provide more details. In the following example, the pre-built export appears side-by-side with the subquery export used to customize the results: