RE: Need to calculate Age based on installation date/birthdate
Hi Ravi,
I have tested with calculated field, it can get data calculated for each record today.
1.Make your DOB field behavior is not date only, otherwise, you can’t use Diffyear function with Now() and birdthdate.
2.For original age field, you can’t change its field type, so you need new another age field (field type is calculated).
3.When all is set and publish all, you can refresh page, then calculated field will show correct age directly.
Also, you can use Flow to update age, which don’t need create another field.
1.Go Power Apps(https://make.powerapps.com/ ) to create an instant flow.
2.Add ‘condition’ step.
3.In Yes branch:
(1) Add ‘compose’ step.
(2) Add ‘Update a record’ step.
split(string(div(div(sub(ticks(utcNow()),ticks(outputs('Compose'))),864000000000),365.25)),'.')[0]
4.Save and test.
In the view, select records you need and expand flow to click the flow just created.
Then wait for several minutes and refresh page, the age will be changed.
Regards,
Leah Ju
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.