Hi, I am trying to replace the value of one variable when the condition holds (the condition is that the survey_data (type double %td ) has to be equal to 04jul2020. When I try this: replace enumerator = 114 if survey_date == 04jul2020; I get the error 04jul2020 invalid name. when i try this: replace enumerator = 114 if survey_date == "04jul2020" , I get the error:
type mismatch.
Could you please help me?
Related Posts with Replace if value is a date
check that rangestat is used correctlyHello, My data has the following variables: symbol (to identify which firm it is), year, industry a…
Sum up # of observations and output to spreadsheet/csvHello, I am trying to accumulate the number of observations for each dataset with a pattern of "con…
Calculating growth & IndexI want to develop variable by s_id which reflect the growth & index of other variable. How can I…
split (Chinese) addressDear All, I have this dataset. Code: * Example generated by -dataex-. To install: ssc install datae…
Creating cumulative frequency time series (overlay panels)Hi all, I have a data set of clients (unique ID) with their week of immunization and age group. Wha…
Subscribe to:
Post Comments (Atom)
0 Response to Replace if value is a date
Post a Comment