Dear all,
I have the following dataset, where the variable inwde captures the date when a respondent finished a survey interview (formatted as %tc).
For example for the first respondent the date 18sep2020 11:21:51 corresponds to 1916047311000
However, for some reason I am not able to work with these dates. For example, running the following commands return no observations:
I need to identify respondents interviewed in a given date (I do not care about the time/hour), but I do not know how to do it. I am sure I am doing something wrong, so if you could point me in the right direction I would really appreciate it.
Thanks!
I have the following dataset, where the variable inwde captures the date when a respondent finished a survey interview (formatted as %tc).
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str2 cntry double inwde "SI" 1916047311000 "SI" 1916053356000 "SI" 1916053685000 "SI" 1916058067000 "SI" 1916061390000 "SI" 1916063002000 "SI" 1916064384000 "SI" 1916076302000 "SI" 1916076578000 "SI" 1916081613000 "SI" 1916129098000 "SI" 1916134104000 "SI" 1916135427000 "SI" 1916141659000 "SI" 1916142740000 "SI" 1916145806000 "SI" 1916146589000 "SI" 1916150409000 "SI" 1916151887000 "SI" 1916157233000 "SI" 1916158693000 "SI" 1916160157000 "SI" 1916233103000 "SI" 1916236730000 "SI" 1916309981000 "SI" 1916313555000 "SI" 1916316030000 "SI" 1916327459000 "SI" 1916330013000 "SI" 1916330154000 "SI" 1916332397000 "SI" 1916333051000 "SI" 1916334443000 "SI" 1916335672000 "SI" 1916340562000 "SI" 1916390441000 "SI" 1916392520000 "SI" 1916393054000 "SI" 1916393709000 "SI" 1916396380000 "SI" 1916397095000 "SI" 1916401776000 "SI" 1916401966000 "SI" 1916408215000 "SI" 1916409243000 "SI" 1916411182000 "SI" 1916411315000 "SI" 1916413477000 "SI" 1916413634000 "SI" 1916414232000 "SI" 1916415162000 "SI" 1916417635000 "SI" 1916417657000 "SI" 1916418083000 "SI" 1916420092000 "SI" 1916420408000 "SI" 1916420558000 "SI" 1916420652000 "SI" 1916420770000 "SI" 1916425447000 "SI" 1916426064000 "SI" 1916469585000 "SI" 1916473605000 "SI" 1916475741000 "SI" 1916475762000 "SI" 1916476486000 "SI" 1916477378000 "SI" 1916478087000 "SI" 1916479657000 "SI" 1916480386000 "SI" 1916481411000 "SI" 1916484954000 "SI" 1916485652000 "SI" 1916486956000 "SI" 1916487818000 "SI" 1916490977000 "SI" 1916493996000 "SI" 1916496134000 "SI" 1916499812000 "SI" 1916500754000 "SI" 1916501387000 "SI" 1916501538000 "SI" 1916501780000 "SI" 1916502096000 "SI" 1916502220000 "SI" 1916503021000 "SI" 1916503446000 "SI" 1916505628000 "SI" 1916506539000 "SI" 1916507055000 "SI" 1916509113000 "SI" 1916509661000 "SI" 1916509781000 "SI" 1916511557000 "SI" 1916556728000 "SI" 1916559332000 "SI" 1916560586000 "SI" 1916561351000 "SI" 1916563318000 "SI" 1916565049000 end format %tc inwde
However, for some reason I am not able to work with these dates. For example, running the following commands return no observations:
Code:
.di date("18sep2020","DMY")
22176
. tab cntry if inwde == date("18sep2020","DMY")
no observations
. tab cntry if inwde == 22176
no observations
Thanks!

Comment