Hello Statalists,
I have a numeric integer variable called Hour that ranges from 0 to 2300. I want to transform it to time hour. 0 to 00:00; 100 to 01:00; 200 to 01:00; ...; 2300 to 23:00.
Please, how do I do that?
Thank you!
I have a numeric integer variable called Hour that ranges from 0 to 2300. I want to transform it to time hour. 0 to 00:00; 100 to 01:00; 200 to 01:00; ...; 2300 to 23:00.
Please, how do I do that?
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float id int hour 1 0 2 100 3 200 4 300 5 400 6 500 7 600 8 700 9 800 10 900 11 1000 12 1100 13 1200 14 1300 15 1400 16 1500 17 1600 18 1700 19 1800 20 1900 21 2000 22 2100 23 2200 24 2300 end
Thank you!
Comment