public function totalday(intdate as date) as string dim strday as string dim strmonth as string dim stryear as string dim strtext as string dim dim dim dim
strprtday as string strprtmonth as string strprtyear as string s as string
strtext = intdate stryear = year(strtext) strmonth = month(strtext) strday = day(strtext) strprtyear = year(date) - [stryear] strprtmonth = month(date) - [strmonth] strprtday = day(date) - [strday] ' // if day is in negative then reverse calculation done \\ if day(date) < strday then strprtday = strday - day(date) end if s = strprtyear & " year, " s = s & strprtmonth & " month, " s = s & strprtday & " day" totalday = s end function