locked
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(){
    debugger;
    var reviewDate=Xrm.Page.getAttribute("po_dateofbirth").getValue();
    alert(reviewDate);
    var currentDate = new Date();
    alert (currentDate);
    var cycletime = math.abs(currentDate - reviewDate);
    alert (cycletime);
    }


    Thanks, Dale

    Wednesday, May 22, 2013 4:23 PM

Answers

All replies