Question4Replies107Views huc73199 Member since 2019 3 posts Abeam Consulting Ltd Posted: 1 month agoUpdated: 1 month 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?Age Calculation.xlsx Pega Marketing Data Integration Java and Activities Data Integration ReplyI also have this Question (0) FacebookTwitterLinkedinEmail Copy Link Copied! Subscribe Add to My Favorites Posted: 1 month agoBala_Nagendra 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 Facebook Twitter Linkedin Email Copy Link Copied! Posted: 1 month agohuc73199 replied to huc73199Thank 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. Facebook Twitter Linkedin Email Copy Link Copied! Posted: 1 month agoBala_Nagendra 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 Facebook Twitter Linkedin Email Copy Link Copied! Posted: 1 month agohuc73199 replied to huc73199Thank you for your reply! It helped! Facebook Twitter Linkedin Email Copy Link Copied!