Good evening to everyone,
I have a variable generated by the command gen Hdate = clock(StartDate, "DMY hms") displayed as 15jan2022 09:06:44.
I would like to create a new variable by using the information in that date format (DMY hms) : eg newvar == 1 on 15 jan from 9 to 10 ; newvar == 2 on 15 jan from 10 to 11 ; newvar == 3 on 15 jan from 11 to 12.
Someone could kindly suggest to me how to handle this date format?
Many thanks in advance for your time
I have a variable generated by the command gen Hdate = clock(StartDate, "DMY hms") displayed as 15jan2022 09:06:44.
I would like to create a new variable by using the information in that date format (DMY hms) : eg newvar == 1 on 15 jan from 9 to 10 ; newvar == 2 on 15 jan from 10 to 11 ; newvar == 3 on 15 jan from 11 to 12.
Someone could kindly suggest to me how to handle this date format?
Many thanks in advance for your time
Comment