W 10-04-12
;
proc print data=meeting;
format mtg sendmail date9.;
title 'When To Send Announcements';
run;
Output 7.3 Calculated Date Values: When to Send Mail
About Date and Time Intervals
Definitions
duration
is an integer representing the difference between any two dates or times or datetimes.
Date durations are integer values representing the difference, in the number of days,
between two SAS dates. Time durations are decimal values representing the number
of seconds between two times or datetimes.
T I P Date and datetimes durations can be easily calculated by subtracting the
smaller date or datetime from the larger. When dealing with SAS times, special
care must be taken if the beginning and the end of a duration are on different
calendar days. Whenever possible, the simplest solution is to use datetimes rather
than times.
interval
is a unit of measurement that SAS can count within an elapsed period of time, such
as DAYS, MONTHS, or HOURS. SAS determines date and time intervals based on
fixed points on the calendar, the clock, or both. The starting point of an interval
calculation defaults to the beginning of the period in which the beginning value falls,
which might not be the actual beginning value specified. For example, if you are
using the INTCK function to count the months between two dates, regardless of the
actual day of the month specified by the date in the beginning value, SAS treats it as
the first of that month.
About Date and Time Intervals 123