Hi, I am writing the below mentioned codes to churn out results from a data set with a specific date range. I set the date as 15dec2015 to get results for 01dec2015 to 31dec2015. The majority of the churned result are from dec2015 but consists some of the earlier result from 2012 to Nov 2015. Can you advise on how I can get the churned results only from dec2015? Below is the code:
libname mis_data "E:\GCC Data Mart\Monthly MIS\Unsecured\FE_Deck\Data"
%put &yymm &yyyymmdd &dt;
Assuming your data includes a SAS date variable (say myDate), all you need is to add the statement
where myDate between intnx("MONTH", &setdt, 0, "BEGINNING") and intnx("MONTH", &setdt, 0,"END");
to your data step, or the clause
where myDate between intnx("MONTH", &setdt, 0, "BEGINNING") and intnx("MONTH", &setdt, 0,"END")
to your SQL query.
If your date variable is a SAS datetime, replace "MONTH" by "DTMONTH".
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.