Displaying 1 result from an estimated 1 matches for "calcul_ag".
Did you mean:
calcul_age
2012 Nov 12
1
problem with Erlang function
...My goal is to write a function that takes an input Erlang entering your
? Name
? Name
? Date of birth.
The program will calculate age and display output
first
I do know the system date (month, day, year)
I find with Sys.Date ()
I found a function. net to calculate the age
Protected Sub calcul_age()
Dim datetimenow = DateTime.Now
Dim datedenaissance = CDate(TbDn.Text)
Dim age As Integer
age = CInt(Now.Year - datedenaissance.Year)
If (datedenaissance.Month > Now.Month) Then
age = age - 1
End If
If ((datedenaissance.Month = Now.Month) And (datedenaissance.Da...