Sub CalculateDogYears(dob As String) As String
Dim p As Period = DateUtils.PeriodBetween(DateTime.DateParse(dob),DateTime.Now)
'Converted From Source http://www.b4x.com/android/forum/threads/calculating-age.44280/
'Thanks to DonManfred
Log((p.years * 7) &" Years, "&p.Months&" months, "&p.Days&" days")
' Add 7 years for each year a dog is alive..
if p.years = 0 then
return (.58333 * p.Months) &" Years, "&p.Months&" months, "&p.Days&" days"
else
Return (p.years * 7) &" Years, "&p.Months&" months, "&p.Days&" days"
end if
End Sub