Nipun_Chandu
Nipun_Chandu

Reputation: 11

I need to find the right age of the applicant using data transforms in pega

I have a UI with a single page properties from a Data type called "customerinfo", From the selected DOB using a data transform, i need to calculate the age of the applicant. Please tell what are the steps i need to follow in the Datatransform and what functions i will be using to calculate. Thanks in advanceenter image description here

Upvotes: -3

Views: 126

Answers (1)

AJ.
AJ.

Reputation: 4534

@DataTime#DateTimeDifference(String strBeginTime,String strEndTime,String strPrecision)

Computes the time difference between two DateTime strings; return the difference as double value corresponding to the specified precision

strBeginTime: starting time

strEndTime: ending time

strPrecision: desired precision, one of "CYMDhmsS" to specify century, year, month, day, hour, minute, second, or millisecond respectively return double difference to specified precision, -1 if parameters invalid.

Example:

DateTimeDifference("20090109T160000.000 GMT", "20090109T162504.370 GMT", "s") = 1504.0

For your scenario below should be the template

@DateTime.DateTimeDifference(YourDateTimeProperty,@DateTime.CurrentDateTime(), "Y")

Upvotes: 0

Related Questions