BookmarkSubscribeRSS Feed
foxrol94
Fluorite | Level 6

Hi, 

 

I have some trouble cause i would like to create a date variable dat in a sas dataset and i'm doing lke this:

 


%let date_traitement=%sysfunc(intnx(month, %sysfunc(today()),-1,e), ddmmyyn8.);
%put NOTE: DATE de Traitement ====> &date_traitement.;
data test;
	set sashelp.Prdsal2;
	date0= put(input(&date_traitement.,ddmmyy10.), ddmmyy10.);
run;

 

Dateset is created but the variable dat have values 3101202 instead of 31012018. I'm a bit confused.

 

Thnaks for your support

 

 

1 REPLY 1
FredrikE
Rhodochrosite | Level 12

Try put &date between quotes:

 

"&date_traitement."

 

//Fredrik

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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