BookmarkSubscribeRSS Feed
mehak
Calcite | Level 5

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;

4 REPLIES 4
mehak
Calcite | Level 5

already done it sir .

 

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
Reeza
Super User

@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><.shift-index>,

start-from,

increment

<, 'alignment'>)

 

Compare the parameters above to yours.

The examples are towards the bottom of the page. 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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