Contributor
Posts: 30

# intnx

Can any1 please help me . I have to calculate field of coupon issuance date .expiry date of coupon is 3 months . But in my data sets i am only having expiry date . Is this the correct way to solve such que

data _class_1;

coupon_issuance_date=intnx('02',20,-3,'b');

proc print data = _class_1 noobs;
run;

Super User
Posts: 9,923

## Re: intnx

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Contributor
Posts: 30

## Re: intnx

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
61
62 data _class_1;
63
64 coupon_issuance_date=intnx('02',20,-3,'b');
65

NOTE: The data set WORK._CLASS_1 has 1 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds

66 proc print data = _class_1 noobs;

67 run;

NOTE: There were 1 observations read from the data set WORK._CLASS_1.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds

68
69 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
82
Super User
Posts: 9,923

## Re: intnx

And did you get the result you expected?

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Super User
Posts: 23,323

## Re: intnx

mehak wrote:

Can any1 please help me . I have to calculate field of coupon issuance date .expiry date of coupon is 3 months . But in my data sets i am only having expiry date . Is this the correct way to solve such que

data _class_1;

coupon_issuance_date=intnx('02',20,-3,'b');

proc print data = _class_1 noobs;
run;

No. Review how the INTNX() documentation, there are examples at the bottom of the page.

http://documentation.sas.com/?docsetId=lefunctionsref&docsetTarget=p10v3sa3i4kfxfn1sovhi5xzxh8n.htm&...

Specifically:

INTNX(interval <multiple>,

increment

<, 'alignment'>)

Compare the parameters above to yours.

The examples are towards the bottom of the page.

Discussion stats
• 4 replies
• 144 views
• 0 likes
• 3 in conversation