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. 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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