One way to do this is to use the dynamic page’s dataset’s onReady function to register an event handler that will get the member’s date of birth, calculate the proper age, and put that age as an element’s value.
So something like this:
$w.onReady(function () {
$w("#dynamicDataset").onReady( () => {
let dob = $w("#dynamicDataset").getCurrentItem().dob;
let age = // calculate age based on dob
$w("#age").text = age;
} );
} );
Another way to do this is to create an afterRouter hook on your dynamic page. Inside the hook you can get the member’s date of birth and calculate the proper age. You can send that data to the page.
To learn about data binding router hooks, see About Data Binding Router Hooks and Creating a Data Binding Router Hook.