Question4Replies343Views huc73199 Member since 2019 3 posts Abeam Consulting Ltd Posted: 8 months agoLast activity: 8 months ago Age Calculation and show the result in recordsHi, I'm a new Pega Marketing user,I want to calculate Age from Date of Birth via Function Alias rule, and show it when I upadate customer data by importing an CSV file.I use this declare expression like this:Whenever inputs change If .Date_of_Birth != NULLThen set Age = @toInt(@substring(@CurrentDateTime(),0,4))-@toInt(@substring(.Date_of_Birth,0,4))Otherwise set Age =NULL But Age didn't show in records after I updated customer data.Please someone tell me how to make the rule's result show in record. Is it need some other setting? Pega Marketing Data Integration Java and Activities Data Integration ×Close popoverFacebookTwitterLinkedinEmail Copy Link Copied! Posted: 8 months agoBala_Nagendra PEGA replied to huc73199 Could you try , @DateTimeDifference(.DOB,@CurrentDateTime(),"Y") it will return a double of the number of years difference between the two dates. So 1.5 would refer to a person one year and 6 months old. Please refer below post which can give more details about age calculation Posted: 8 months agohuc73199 Abeam Consulting Ltd replied to Bala_NagendraThank you for your comment, I tried your advise like @DateTimeDifference(@CurrentDateTime(),.Date_of_Birth,"Y") and I got a result of "-2.147483648E9". If I just want an integer result, maybe need an tranfer, am I right? And "Age" didn't show in record when I update customer data. Is it ralated to the type of column? Please tell me more detail about these, or other post that may help me understand this function. Posted: 8 months agoBala_Nagendra PEGA replied to huc73199Sorry I missed to add the post link. COuld you check below link and see if it helps. https://community1.pega.com/community/product-support/question/calculating-age-activity Posted: 8 months agohuc73199 Abeam Consulting Ltd replied to Bala_NagendraThank you for your reply! It helped!