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

Hi,

 

I really would like help with finding out which two dates these numbers identifies in SAS;

15218

17166

 

I need to know if I have it correct...

 

/Eva

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26
data _null_;
     y1=15218;
     y2=17166;
     put y1 date9. / y2 date9.;
run;
--
Paige Miller

View solution in original post

6 REPLIES 6
novinosrin
Tourmaline | Level 20

Format and see

 

data dates;
do dates=15218,17166;
output;
end;
format dates date9.;
run;
Eva7
Calcite | Level 5
Thank you. Did not get this to work but got an other suggestion that did.
Eva
novinosrin
Tourmaline | Level 20

Very nice. May i request what didn't work? I find that strange as my test yielded the correct results. Plus will help me learn from my mistakes

4915  data dates;
4916  do dates=15218,17166;
4917  output;
4918  end;
4919  format dates date9.;
4920  run;

NOTE: The data set WORK.DATES has 2 observations and 1 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds

Results:

dates
31AUG2001
31DEC2006
Eva7
Calcite | Level 5
i didnt get an outout??? probably my mistake
eva

PaigeMiller
Diamond | Level 26
data _null_;
     y1=15218;
     y2=17166;
     put y1 date9. / y2 date9.;
run;
--
Paige Miller
Eva7
Calcite | Level 5
Thank You! It worked and my dates were correct!
Eva
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
  • 6 replies
  • 1506 views
  • 1 like
  • 3 in conversation