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
How to create a variable representing the max length of consecutively same numbers in a row?I am trying to find a way to caculate the max length of consectively same numbers in each row . For …
Converting Numeric to String without changes the numbers.How can I change ID numbers "11222333 11222334 11122245" to string variables without them being chan…
Mismathing data when summarizing a variableWhen I try to summarize data the information that the functio returns to me doesn't match with what …
Change last 4 digits in String type How can I change last 4 digits of co_end_variable to finyear ? For the data below, for example, 01…
How can I multiply two category variables by another category variable to create a new variable? Hi All, I want to create a new variable which is (Age * Education levels). But the problem is that…
Subscribe to:
Post Comments (Atom)
0 Response to Replace if value is a date
Post a Comment