Hello, I tried searching for similar questions, but wasn't able to get anything to work. I want to create a dummy variable just based on the year in the date variable (format: %tcnn/dd/ccYY_hh:MM). Can anyone help me with the code?
So far I have tried:
Thank you in advance.
So far I have tried:
Code:
generate sample_1 = . replace sample_1 = 1 if Date<td(12/05/1995)

Comment