+ Start a Discussion

age calculation

date calculation in visualforce form

Chamil MadusankaChamil Madusanka

You can use folmula filed for that. Refer following link



If you got the answer from this post, Please hit the Kudos button & mark the answer as solution, It might help others running to into similar problem in future.


If it is a Date field then


 Integer age = Integer.valueOf(Account.PersonBirthDate.daysBetween(System.today())/365.2425);


@vijit Capgemini Developer