You need to sign in to do that
Don't have an account?
SIVASASNKAR
Triggers
I want find the Age of Employee With the help of Trigger Based on Date of Birth and Todays Date?
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
I want find the Age of Employee With the help of Trigger Based on Date of Birth and Todays Date?
Hi,
You have to use the daysbetween method of date to achieve this.
Try the below code as reference:
Trigger AgeCalculation on Contact (before insert,before update)
{
Date dt=trigger.new[0].birthdate;
Integer age= dt.daysbetween(system.today())/365;
System.debug('@@@@@@@@@@@@@@@@@@' +age);
}
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Hi Siva,
If you satiesfied with the above answer, please close this discussion.
Feel free to contact me, if you have any queries.
Regards,
Amit Kumar Gupta
Salesforce.com