DATA Step, Macro, Functions and more

entering a fixed date for all observations

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 136
Accepted Solution

entering a fixed date for all observations

i I have a dataset of 1000 observation. I want to enter a fixed date that applies to all observations

id 

1

2

3

4

 

output date

id date1

1  01/01/2012

2  01/01/2012

3  01/01/2012

4  01/01/2012 


Accepted Solutions
Solution
‎09-25-2017 01:26 PM
Respected Advisor
Posts: 2,805

Re: entering a fixed date for all observations

Posted in reply to lillymaginta
data want;
     set have;
     date1='01JAN12'd;
     format date1 mmddyy10.;
run;
--
Paige Miller

View solution in original post


All Replies
Solution
‎09-25-2017 01:26 PM
Respected Advisor
Posts: 2,805

Re: entering a fixed date for all observations

Posted in reply to lillymaginta
data want;
     set have;
     date1='01JAN12'd;
     format date1 mmddyy10.;
run;
--
Paige Miller
Frequent Contributor
Posts: 136

Re: entering a fixed date for all observations

Posted in reply to PaigeMiller

Thank you!

☑ This topic is solved.

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

Discussion stats
  • 2 replies
  • 146 views
  • 1 like
  • 2 in conversation