Returns 1 if a time interval is valid, and returns 0 if a time interval is invalid.
Category:  Date and Time 
specifies a character constant, variable, or expression that contains an interval name, such as WEEK, MONTH, or QTR. interval can appear in uppercase or lowercase. The possible values of interval are listed in Intervals Used with Date and Time Functions in SAS Language Reference: Concepts.
Here are the three parts of the interval name:
specifies the name of the basic interval type. For example, YEAR specifies yearly intervals.
specifies an optional multiplier that sets the interval equal to a multiple of the period of the basic interval type. For example, YEAR2 consists of twoyear, or biennial, periods.
See  Incrementing Dates and Times By Using Multipliers and By Shifting Intervals for more information. 
specifies an optional shift index that shifts the interval to start at a specified subperiod starting point. For example, YEAR.3 specifies yearly periods that are shifted to start on the first of March of each calendar year and to end in February of the following year.
Restrictions  The shift index cannot be greater than the number of subperiods in the whole interval. For example, you could use YEAR2.24, but YEAR2.25 is invalid because there is no 25th month in a twoyear interval. 
If the default shift period is the same as the interval type, then only multiperiod intervals can be shifted with the optional shift index. For example, because MONTH type intervals shift by MONTH subperiods by default, monthly intervals cannot be shifted with the shift index. However, bimonthly intervals can be shifted with the shift index, because there are two MONTH intervals in each MONTH2 interval. For example, the interval name MONTH2.2 specifies bimonthly periods starting on the first day of evennumbered months.  
See  Incrementing Dates and Times By Using Multipliers and By Shifting Intervals for more information. 
SAS Statement

Result


test1=inttest('month'); put test1; 
1 
test2=inttest('week6.13'); put test2; 
1 
test3=inttest('tenday'); put test3; 
1 
test4=inttest('twoweeks'); put test4; 
0 
var1='hour2.2'; test5=inttest(var1); put test5; 
1 