I do know there are many Javascripts available to calculate age based on current date, But I want to calculate age between two user given dates - - For example, a user must be able to choose the Start date,day & year from a dropdown menu.Similarly the user must also be able to choose the End date,day & year. -----On clicking Calculate ,the result between the dates should be displayed as age in years & months (like 24 yrs 6 months) - - Can anyone give me the code to set this up?
Check out datejs and learn to use that library. I can help you with code for a low price. PM me if you want my assistance.
The code below works, just change the dates to suit your calculation. <script type="text/javascript"> //Set the two dates today=new Date() var christmas=new Date(today.getFullYear(), 11, 25) //Month is 0-11 in JavaScript if (today.getMonth()==11 && today.getDate()>25) //if Christmas has passed already christmas.setFullYear(christmas.getFullYear()+1) //calculate next year's Christmas //Set 1 day in milliseconds var one_day=1000*60*60*24 //Calculate difference btw the two dates, and convert to days document.write(Math.ceil((christmas.getTime()-today.getTime())/(one_day))+ " days left until Christmas!") </script>