I need to make an age calculator which inputs the date of birth from user and calulates age respectively. The age is shown in days,yrs,months , hours minutes and seconds.
age calculator that calulates age in days months yrs minutes seconds
Collapse
X
-
-
Comment
-
Private Sub Command2_Click( )
days = InputBox("enter DOB:")
z = Date
d = DateDiff("d", days, z)
e = DateDiff("m", days, z)
f = DateDiff("yyyy" , days, z)
datetoday = Format("dd", Date)
monthtoday = Format("mm", Date)
yeartoday = Format("yyyy", Date)
MsgBox d & "days" & "," & e & "months" & "," & f & "years"
End SubComment
Comment