skip to main
|
skip to sidebar
The Legacy Learner
Saturday, April 2, 2016
SAS: Select datetime field into a macro variable
How to select a datetime field into a macro variable, and use it later...
use format=date16.
enclose macro variable in quotes, followed by dt
proc sql noprint;
select max(dttm)
format=date16.
into :max_dttm from some_table;
quit;run;
data work.subset;
set work.my_input (where=(dttm =
"&max_dttm"dt
));
* etc. ;
run;
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Followers
Blog Archive
►
2019
(6)
►
June
(1)
►
May
(1)
►
February
(1)
►
January
(3)
►
2018
(12)
►
August
(1)
►
June
(2)
►
May
(5)
►
April
(1)
►
February
(2)
►
January
(1)
►
2017
(11)
►
November
(1)
►
September
(3)
►
August
(1)
►
June
(1)
►
May
(3)
►
April
(1)
►
March
(1)
▼
2016
(14)
►
November
(2)
►
October
(3)
►
July
(3)
►
June
(3)
▼
April
(1)
SAS: Select datetime field into a macro variable
►
January
(2)
►
2015
(19)
►
December
(1)
►
November
(2)
►
October
(5)
►
September
(2)
►
July
(1)
►
June
(2)
►
April
(1)
►
March
(4)
►
February
(1)
►
2014
(14)
►
December
(1)
►
November
(3)
►
September
(3)
►
August
(2)
►
May
(1)
►
February
(3)
►
January
(1)
►
2013
(38)
►
December
(4)
►
November
(2)
►
July
(1)
►
June
(2)
►
May
(1)
►
April
(2)
►
March
(4)
►
February
(7)
►
January
(15)
►
2012
(9)
►
December
(9)
About Me
bq688
View my complete profile
No comments:
Post a Comment