Hello
I am trying to calculate a Age of a person. I have 3 different input boxes named monthv, dayv and yearv respectively and one dynamic text box named result. I have the following code
but when I click the button after entering the date of birth it showCode:on (release) { monthU=monthv-1; birth=new Date(yearv.text, monthv.text, dayv.text); today-new Date(); age=math.floor(((((today-birth)/1000/60)/60)/24)/365); result.text = "you are " +age + " years old. "; }
It does not calculate the age instread it shows undefined. IS my code correct? or am I missing something?you are undefined years old.
Please help me
Regards
Aneel





Bookmarks