Xbasic
*years_between Function
Syntax
dim Result as N = *YEARS_BETWEEN(t1 as T, t2 as T)
Arguments
- t1Time
A datetime value.
- t2Time
A datetime value
Returns
- ResultNumeric
Returns the years between two dates or times. If t2 is a date or time later than t1, *YEARS_BETWEEN will return a negative value.
Description
Return difference of years between two dates or times.
Example
dim birthDate as t = convert_type({01/20/1981},"T") dim now as t = now() dim age as n = *years_between(now, birthDate) ? age = 36
See Also