How to make this dateformat in SAS 11052021?
What do you mean "make this dateformat"? Do you mean apply it to a variable?
11052021 does not have a clear meaning. Is it MMDDYYYY or DDMMYYYY or something else?
i need to have a date that I make in this macro. Currently it gives me 11/05/21 - but i want it to come out like 11052021
%let todaysDate = %sysfunc(today(), DDMMYY8.);
%put &todaysDate;
%let todaysDate = %sysfunc(today(), DDMMYYN8.);
Please note: macro variables should not be formatted, except in rare instance, or when used in titles, labels or external file names. If you are not in one of these cases, do not format your macro variables.
Your example code should have ideally been included in your original question. You will get faster and more correct answers by being specific in your first post.
thank you this only adds 110521 - can I add 2021
Sorry my bad it works
sorry i clicked wrong - this i not what I need - I need it as a macro so that I can put it in a file name
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.