1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
DATA LIST FIXED /dob 1-10(SDATE) date2 12-21(SDATE) date3 23-32(SDATE) date4 34-43(SDATE).
BEGIN DATA
1940-10-09 2000-10-09 1980-01-07 2000-10-10
1952-10-01 2000-10-09 1980-01-07 2000-10-10
1980-01-07 2000-06-10 1980-01-07 2000-10-10
1980-07-01 2000-07-02 2000-07-02 2000-01-10
1980-07-01            2000-07-02 2000-01-10
1980-07-01            2000-05-02 2000-01-10
1980-07-01                        2000-01-10
1980-07-01                        1998-01-10
END DATA.
LIST.

VARIABLE WIDTH dob date2 TO date4 (12).
EXECUTE.

* Calculate age (in years and fraction of years) on June 30,2000.
COMPUTE age=CTIME.DAYS(DATE.DMY(30,6,2000)-dob)/365.25.
EXECUTE.