AGE (return age from base date)

Top  Previous  Next

 

AGE(birthdate [,base date])

AGE

Returns elapsed time.

birthdate

A numeric expression for a standard date.

base date

A numeric expression for a standard date. If this parameter is omitted, the operating system date is used for the computation.

The AGE procedure returns a string containing the time elapsed between two dates. The age return string is in the following format:

1 to 60 days         - 'nn DAYS'

61 days to 24 months - 'nn MOS'

(2 years + 1 month) to 999 years - 'nnn YRS'

 

Return Data Type:

STRING

Example:

Message = Emp:Name & 'is ' & AGE(Emp:DOB,TODAY()) & ' old today.'

 

See Also:

Standard Date

DAY

MONTH

YEAR

TODAY

DATE