Hello,
I have an int variable (not string; format %td) that presents date as "01jan1900". As this is not what I wanted and miscoded, I would like to convert this into integers such as 0,1,2,3. The codes I tried are as follows but they didn't work.
Your help will be appreciated. Thank you!
Kind regards,
Kim
I have an int variable (not string; format %td) that presents date as "01jan1900". As this is not what I wanted and miscoded, I would like to convert this into integers such as 0,1,2,3. The codes I tried are as follows but they didn't work.
Code:
replace HVPN_E14_C64 = 0 if HVPN_E14_C64 =="31dec1899" type mismatch
Code:
gen HVPN_E14_C64_real =real(HVPN_E14_C64) type mismatch
Code:
replace HVPN_E14_C64 = 0 if HVPN_E14_C64 ==31dec1899 31dec1899 invalid name
Kind regards,
Kim
Comment