Skip to content

Instantly share code, notes, and snippets.

@statgeek
Created March 17, 2014 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save statgeek/9602207 to your computer and use it in GitHub Desktop.
Save statgeek/9602207 to your computer and use it in GitHub Desktop.
SAS - Fiscal Year start and end from a date value
/*How to calculate the fiscal year start and end from a date value*/
%let date="01Sep2013"d;
data _null_ ;
fstart=intnx('year.4',&date,0,'b') ;
fend=intnx('year.4',&date,1,'b')-1;
format fstart fend date9.;
put _all_;
run ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment