Date Intervals, Formats, and Functions |
SAS provides functions to perform calculations with SAS date, time, and datetime values. SAS date, time, and datetime functions are used to perform the following tasks:
compute date, time, and datetime values from calendar and time-of-day values
compute calendar and time-of-day values from date and datetime values
convert between date, time, and datetime values
perform calculations that involve time intervals
provide information about time intervals
provide information about seasonality
SAS date, time, and datetime functions are listed in alphabetical order in the following section. The intervals and other character arguments for interval functions can be supplied either directly as a quoted string or as a SAS character variable. However, when you use a character variable, you should set the length of the character variable to at least the length of the longest string for that variable used in the DATA step.
Also, to ensure correct results when using interval functions, use date intervals with date values and datetime intervals with datetime values.
See SAS Language Reference: Dictionary for a complete description of these functions.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.