@phpnoviceApr 09.2006 — #The form date needs to be an "mm/dd/yyyy" format. The following presumes that the user-specified date will actually be prior to the current date: <i> </i>var usrDate = new Date(termStartDate); var curDate = new Date(); var usrYear, usrMonth = usrDate.getMonth()+1; var curYear, curMonth = curDate.getMonth()+1; if((usrYear=usrDate.getFullYear()) < (curYear=curDate.getFullYear())){ curMonth += (curYear - usrYear) * 12; } var diffMonths = curMonth - usrMonth; if(usrDate.getDate() > curDate.getDate()) diffMonths--; alert("There are " + diffMonths + " months between " + usrDate + " and " + curDate);
@LeeUAug 24.2006 — #Please help in finding out , How do you change number of months to dd/mm/yyyy format?
Example: August 24 2006 minus 0 years 10 months 0 days would be October 24 2005 sysdate-numberofmonth=dateformat[/QUOTE] Asked and answered [URL=http://www.webdeveloper.com/forum/showthread.php?t=118949]here[/URL]