|
Chapter Contents |
Previous |
Next |
| YRDIF |
| Category: | Date and Time |
| Syntax | |
| Arguments | |
| Examples | |
| See Also |
Syntax |
| YRDIF(sdate,edate,basis) |
| Alias: | '360' |
| Tip: | If either date falls at the end of a month, it is treated as if it were the last day of a 30-day month. |
| Alias: | 'Actual' |
| Examples |
In the following example, YRDIF returns the difference in years between two dates based on each of the options for basis.
data _null_; sdate='16oct1998'd; edate='16feb2003'd; y30360=yrdif(sdate, edate, '30/360'); yactact=yrdif(sdate, edate, 'ACT/ACT'); yact360=yrdif(sdate, edate, 'ACT/360'); yact365=yrdif(sdate, edate, 'ACT/365'); put y30360= yactact= yact360= yact365=; run;
| SAS Statements | Results |
|---|---|
put y30360=; put yactact=; put yact360=; put yact365= |
4.333333333 4.3369863014 4.4 4.3397260274 |
| See Also |
| Functions:
|
|
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.