Returns a time interval that is aligned between two dates.
| Category: | Date and Time |
specifies a SAS expression that represents a SAS date or datetime value, or an observation.
| Tip | Observation numbers are more likely to be used as arguments if date or datetime values are not available. |
specifies whether the arguments are SAS date values, datetime values, or observations.
| d | specifies that argument-1 and argument-2 are date values. |
| dt | specifies that argument-1 and argument-2 are datetime values. |
| obs | specifies that argument-1 and argument-2 are observations. |
obs. If Jason used the gym the first time
and the 25th time that a researcher recorded data, you could determine
the interval by using the following statement: interval=intfit(1,25,'obs');.
In this case, the value of interval is OBS24.2.
data a;
length interval $20;
date1='01jan11'd;
do i=1 to 25;
date2=intnx('day', date1, i);
interval=intfit(date1, date2, 'd');
output;
end;
format date1 date2 date.;
run;
proc print data=a;
run;