BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
zdassu
Quartz | Level 8

Hi I have a column called SystemDate with a date format yymmdd8 and the date is being displayed  06-08-10 I would like to rename the column to Todaysdate and have the date format DDMMYY10 10/08/2006. How would I go about changing the format of the date?

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User
data want;
set have (rename=(systemdate=todaysdate));
format todaysdate ddmmyy10.;
run;

If your dataset is large and you do not need to preserve its original status, consider using proc datasets.

View solution in original post

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26
data want;
  set have (rename=(systemdate=todaysdate));
  format todaysdate ddmmyy10.;
run;
Oligolas
Barite | Level 11

Hi,

 

DATA have;
   systemDate="10AUG2006"d;
   format systemdate yymmdd8.;
RUN;

DATA want;
   SET have(rename=(SystemDate=Todaysdate));
   format Todaysdate DDMMYY10.;
RUN;
________________________

- Cheers -

Kurt_Bremser
Super User
data want;
set have (rename=(systemdate=todaysdate));
format todaysdate ddmmyy10.;
run;

If your dataset is large and you do not need to preserve its original status, consider using proc datasets.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 2633 views
  • 0 likes
  • 4 in conversation