geetha
geetha

Reputation: 23

Read dates when its in quotes

How to read the dates with quotes. I tried without quotes, its working fine.

How to chance the sysfunc according to it.

%let date='2017-01-01'; 
%let et=%sysfunc(intnx(month,%sysfunc(inputn(&date.,yymmdd10.)),2,s),yymmn6.);
%put   &et.;

Upvotes: 1

Views: 36

Answers (1)

Shenglin Chen
Shenglin Chen

Reputation: 4554

Use dequote to remove the quotation marks:

%let date='2017-01-01'; 
%let et=%sysfunc(intnx(month,%sysfunc(inputn(%sysfunc(dequote(&date.)),yymmdd10.)),2,s),yymmn6.);
%put   &et.;

Upvotes: 2

Related Questions