Following is a response from Senior DHS staff member, Tom Pullum:
The Stata lines pasted below will give a variable that is 1 for interview dates on or after March 25, 2020, and 0 for earlier dates. If you want to run this in the IR or KR file, just replace "hv" with "v'.
use "...IAPR7EFL.DTA", clear
gen days_out=mdy(hv006,hv016,hv007)-mdy(3,25,2020)
gen after=0
replace after=1 if days_out>=0
label define after 0 "" 1 ""
label values after after
tab after
Using the "mdy" command will give what you want.
[Updated on: Thu, 14 December 2023 07:35]
Report message to a moderator