Hi. I am trying to generate an indicator variable (platform=1) that is conditional on a string variable (campus) and if the date is greater than 16 February 2024. My date variable is a float, format %td (data below). I've tried
, but that doesn't work.
Any help will be much appreciated
Code:
gen int platform=1 if campus=="MTC" & appt_date==>date("16022024","DMY")
Any help will be much appreciated
Code:
input str23 campus float appt_date "MTC" 22646 "KAR" 22646 "MTC" 22646 "KAR" 22646 "KVC" 22646 "KVC" 22646 "MTC" 22646 "KAR" 22646 "KVC" 22646 "GMRV" 22646 "KVC" 22646 "KAR" 22646 "KVC" 22646 "KVC" 22646 "KAR" 22646 "MTC" 22646 "KVC" 22646 "KVC" 22646 "KAR" 22646 "KAR" 22646 "KAR" 22646 "MTC" 22646 "GMRV" 22646 "KVC" 22646 "KAR" 22646 "GMRV" 22646 "MTC" 22646 "KVC" 22646 "KAR" 22646 "KVC" 22646 "KVC" 22646 "KAR" 22646 "GMRV" 22646 "KVC" 22646 "KVC" 22646 "KAR" 22646 "KVC" 22646 "KAR" 22646 "MTC" 22646
Comment