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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 867 views
  • 0 likes
  • 3 in conversation