Dear Statalist reader,
My datafile has 2 date variables A (type: long, format: %d) and B (type: str9, format: %9s), A is like 12jul2011 and B is like 11-Nov-2011. I hope to drop all the observations if A is after B. I used the following command but it does not work (It shows type mismatch). I tried to change the format but I am not sure how to do that. Is there anyone can help me figure out the problem?
Command I used: Drop if A>B
Thank you!
My datafile has 2 date variables A (type: long, format: %d) and B (type: str9, format: %9s), A is like 12jul2011 and B is like 11-Nov-2011. I hope to drop all the observations if A is after B. I used the following command but it does not work (It shows type mismatch). I tried to change the format but I am not sure how to do that. Is there anyone can help me figure out the problem?
Command I used: Drop if A>B
Thank you!
Comment