CRM 2011 Date Difference (in years) RRS feed

  • Question

  • Good Morning,

    I am trying to calculate the age of a person from the date of birth and am not having any luck.  I have found some examples on like but nothing that is working.  Can some please tell me how to make this code work?

    function CheckDOB(){
    var reviewDate=Xrm.Page.getAttribute("po_dateofbirth").getValue();
    var currentDate = new Date();
    alert (currentDate);
    var cycletime = math.abs(currentDate - reviewDate);
    alert (cycletime);

    Thanks, Dale

    Wednesday, May 22, 2013 4:23 PM


All replies