Solved
Contributor
Posts: 30

# intck

calculate the months , weeks, days seperately  since coupon expiry date from current date to 31 march 2014.

data _class_s;
date1 = '21OCT2017'd;
date2 = '31MAR2014'd;
no_of_months = intck ('MONTH', date1, date2);
no_of_weeks = intck ('WEEK', date1, date2);
no_of_days = intck ('DAY', date1, date2);
format date1 date2 date9.;
proc print data = _class_s noobs;
run;

can any1 please tell me whati have to do to add coupon expiry date in this code .

Accepted Solutions
Solution
‎10-21-2017 09:56 AM
Super User
Posts: 9,855

## Re: intck

As I read your homework, you have to run a do loop from the current date back to March 31, 2014.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code

All Replies
Solution
‎10-21-2017 09:56 AM
Super User
Posts: 9,855

## Re: intck

As I read your homework, you have to run a do loop from the current date back to March 31, 2014.

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

## Re: intck

sir  can you please tell me how can i take difference between the var called coupon id , current date and 31march

Super User
Posts: 9,855

## Re: intck

mehak wrote:

sir  can you please tell me how can i take difference between the var called coupon id , current date and 31march

Differences are calculated with a subtraction. Date and time differences are calculated with intck, as you already know.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
☑ This topic is solved.