4.16 age - Age

Format 1: age(Birth dateYYYYMMDD,$date$)

Format 2: age(Birth dateYYYYMMDD,$time$)

Computes age with $date$ (format 1) and $time$ (format 2). Conversion of date or time values to birth date (in year, month, day format).

Example

Example 1: Basic Example

Compute the age from date of birth to a fixed point on calendar on September 1, 2013.

$ more dat1.csv
id,dob
1,19641010
2,20000101
3,
4,19770812
$ mcal c='age($d{dob},0d20130901)' a=rsl i=dat1.csv o=rsl1.csv
#END# kgcal a=rsl c=age($d{dob},0d20130901) i=dat1.csv o=rsl1.csv
$ more rsl1.csv
id,dob,rsl
1,19641010,48
2,20000101,13
3,,
4,19770812,36