I have the list of users with DOB in an excel sheet and I want to calculate their age individually how can that be achieved in PS.
PFB example for reference.
You can use Modified Java Script step to calculate age of each user.
Add Modified Java Script step in your workflow.
While reading, take datatype of DOB as date.
To calculate age, lets first take currentDate by using inbuilt Date() function of Java script.
Create new variable Age and call DateDiff() function. Pass required parameters.
First parameter would be DOB. Second parameter would be currentDate. In third parameter we need to mention either day or month or year in which we want to calculate the difference. We would mention “y” for year.It will give you age in no of years.
I tried to implement the above steps. Its working as expected. Thanks.
Can you elaborate more about how you can solve this.
Is there any other way of calculating age except the Modified Java Script step?
All steps done by Modified Java Scripts can be made using the Formula or Calculator Steps as well.