What exactly do you want to do?
See this thread for inspiration
Something like this?
data _null_;
call symputx('fin_start', mdy(4, 1, year(today())));
call symputx('fin_end', mdy(4, 1, year(today())+1));
run;
%put &fin_start. &fin_end.;
How do you use that information? If the main purpose is to determine if a date value is in a given fiscal year you might get by with either a custom function or something similar to:
%macro myfiscalyear(date); /* date must be a sas date value either in the 'ddmmyyyy'd form or SAS numeric value of a date*/ %eval (%sysfunc(year(&date)) + %eval(%sysfunc(month(&date))> 4 )) %mend; %put Fiscal year of 23AUG2018 is %myfiscalyear('23AUG2018'd); %put Fiscal year of 12345 is %myfiscalyear(12345);
%let fin_start = %sysfunc(intnx(year.4,%sysfunc(today()),0,b),date9.);
%let fin_end = %sysfunc(intnx(year,"&fin_start"d,1,s),date9.);
%put &fin_start &fin_end ;
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.