## What does adding MONTH.1 do for a custom interval in the INTNX function?

Solved
Occasional Contributor
Posts: 17

# What does adding MONTH.1 do for a custom interval in the INTNX function?

Hello,

I'm new to SAS programming and I have a syntax question on the INTNX function.  I inherited a program which has the following % let statement below and I don't understand the first argument used in the INTNX function with "MONTH.1" as the custom interval.  I don't understand exactly what the .1 added to MONTH is doing.  I've searched quite a bit on the internet for a similar example explaining multipliers and shifting intervals but I haven't seen a similar example.  Is this redundant coding to add .1 to MONTH when running a program monthly?  Would it still return the same result if the .1 was omitted?  The code is intended to return the prior year and month to the month in which you run the program.

%let final_model = cvm2.final_cv_model_%SYSFUNC(intnx(MONTH.1,"&SYSDATE"D,-1), YYMMN.);

Eric

Accepted Solutions
Solution
‎05-18-2016 04:20 PM
Valued Guide
Posts: 534

## Re: What does adding MONTH.1 do for a custom interval in the INTNX function?

[ Edited ]

Hi Eric,

The general form of an interval is

name<multiplier>.<shift-index>

In your case MONTH and MONTH.1 are equivalent. The multiplier and shift iidex allow you to specify intervals that begin in different parts of the year.

You can find the documentation on date and time intervals on the SAS support site: Date and Time Intervals.

Hope this helps,

- Jan.

All Replies
Solution
‎05-18-2016 04:20 PM
Valued Guide
Posts: 534

## Re: What does adding MONTH.1 do for a custom interval in the INTNX function?

[ Edited ]

Hi Eric,

The general form of an interval is

name<multiplier>.<shift-index>

In your case MONTH and MONTH.1 are equivalent. The multiplier and shift iidex allow you to specify intervals that begin in different parts of the year.

You can find the documentation on date and time intervals on the SAS support site: Date and Time Intervals.

Hope this helps,

- Jan.

Occasional Contributor
Posts: 17

Thank you Jan!
Valued Guide
Posts: 534

## Re: What does adding MONTH.1 do for a custom interval in the INTNX function?

You're welcome. If it really was what you were looking for please consider flagging my response as a solution.

Regards Jan.
🔒 This topic is solved and locked.