Created
March 17, 2014 16:05
-
-
Save statgeek/9602207 to your computer and use it in GitHub Desktop.
SAS - Fiscal Year start and end from a date value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*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