Programming the statistical procedures from SAS

sas date format

Accepted Solution Solved
Reply
Frequent Contributor
Frequent Contributor
Posts: 79
Accepted Solution

sas date format

Hello,

I have a simple date formatting question  say  I have a date variable

%let mydate = today()-1;

I want to create another date variable that is in the form of

%let mydateformatted = '27-Apr-2014';

I am not sure how to do this. any help is appreciated

Thanks!


Accepted Solutions
Solution
‎04-28-2014 09:17 PM
Respected Advisor
Posts: 3,124

Re: sas date format

Seems to me that a similar topic has just been touched today.

%let mydateformatted=%bquote(')%sysfunc(intnx(day,%sysfunc(today()),-1),date11.)%bquote(');

%put &mydateformatted;


Haikuo

View solution in original post


All Replies
Solution
‎04-28-2014 09:17 PM
Respected Advisor
Posts: 3,124

Re: sas date format

Seems to me that a similar topic has just been touched today.

%let mydateformatted=%bquote(')%sysfunc(intnx(day,%sysfunc(today()),-1),date11.)%bquote(');

%put &mydateformatted;


Haikuo

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 160 views
  • 0 likes
  • 2 in conversation