Hello,
I have a query that selects a single day's data using the macro &date.
Create table work.temptpc
select t1.cc, t1.turn_dt, t1.delay_hrs
from imcs.pay_tpc_prd_a t1
where turn_date = "&date"d
My question is I now would like the query to also grab (filter) our fiscal year data from imcs.pay_tpc_prd_a from the date selected using macro &date. Our fiscal year is April 1 - March 31.
Example: If the date selected was September 1, 2013, the fiscal year would be April 1, 2013 - March 31, 2014.
Thanks for your help in advance,
Lori
Hiya,
Create the following macros using your &date one to subset:
| data _null_ ; | |
| call symput('fstart',intnx('year.4',&date,0,'b')) ; | |
| call symput('fend',intnx('year.4',&date,1,'b')-1) ; |
run ;
cheers
Steve
Hiya,
Create the following macros using your &date one to subset:
| data _null_ ; | |
| call symput('fstart',intnx('year.4',&date,0,'b')) ; | |
| call symput('fend',intnx('year.4',&date,1,'b')-1) ; |
run ;
cheers
Steve
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.