Question
1
Replies
947
Views
Posted: February 27, 2019
Last activity: February 27, 2019
Closed
Calculate difference from DOB with Current Date
Hi All,
I wanted to calculate difference from current date to user entered date i.e DOB.
In pega what is the function we can used?
Thanks,
Sagar
***Edited by Moderator Marissa to update platform capability tags****
Hi sagar,
you can achieve by declare expression use the below expression in declare expression rule on target property where .EnterDOB is source property
@(Pega-RULES:ExpressionEvaluators).round(@(Pega-RULES:DateTime).DateTimeDifference(.EnterDOB+"T000000.000 GMT",@(Pega-RULES:DateTime).CurrentDateTime(), "Y"))