Hello,
I am having an issue with what I believe is an easy fix, but I can not figure it out.
Below is an example of the data, but dates are appearing as integers (I apologize, I do not know how to show dataex output with the dates instead of the integers.)
Thank you!
I am having an issue with what I believe is an easy fix, but I can not figure it out.
- I have two variables: GSGiftDate and ExclDate.
- I want to generate a new variable, called closest_date, which is just a copy of the GSGiftDate closest to the ExclDate. (There are multiple GSGiftDates per person).
Below is an example of the data, but dates are appearing as integers (I apologize, I do not know how to show dataex output with the dates instead of the integers.)
Thank you!
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long Pidm int(GSGiftDate ExclDate) 70004818 19791 19834 70005329 . 20933 70005329 14943 . 70006439 . 19705 70006926 . 21343 70007215 . 19019 70007865 . 20727 70007865 . 20810 70017704 19744 19758 70017704 20600 . 70017704 20229 . 70025931 . 19758 70043515 . 19019 70043515 20163 . 70043515 16141 . 70043515 15609 . 70044093 . 19019 70044093 17969 . 70044093 15620 . 70044093 17166 . end format %td GSGiftDate format %td ExclDate
Comment