tell me about intnx, intcx functions?

Answer Posted / natrajboga

the INTCK function counts the number of intervals between
the two dates

where as INTCX function advances the date or time values
by a given interval and returns a date or time values

for example:

data xxx;
count= intck('week','1aug1998'd,'31aug1998'd);
run;
proc print;run;
the result would be 5 (it represents the no of weeks)

data yyy;
count= intnx('month','1aug1998'd,1);
run;

proc print;run;
the result would be the 1sep1998. becaz it corresponds to
the beginning of the next interval.

Is This Answer Correct ?    15 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between SAS STATA & SPSS?

666


Enlist the syntax rules followed in sas statements.

602


how to do user inputs and command line arguments in sas?

2417


how would you create multiple observations from a single observation? : Sas programming

558


Can you execute macro within another macro? If so, how would sas know where the current macro ended and the new one began? : sas-macro

686






What would you change about your job?

1913


How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data?

624


How to sort in descending order?

779


What is the difference between the proc sql and data step?

650


what is sas application server, database server, sas olap server and sas metadata server? : Sas-di

542


Name validation tools used in SAS

677


describe how to adjust the performance of data integrator? : Sas-di

548


What are the data types does SAS contain?

641


Differentiate input and infile.

586


What is a method for assigning first.VAR and last.VAR to the BY group variable on unsorted data?

1989