Hello,
I hope to extract and create a new variable for both month and year, which I have seen some guidance on how to do already. But my issue is that the variable I'm working with is not in the proper format and the variable also includes the precise time of day, as you can see:
I don't need the precise time at all (if that helps to just erase it), and my main end goal is to just create a new variable for month and new variable for year. Thank you in advance for any insight!
I hope to extract and create a new variable for both month and year, which I have seen some guidance on how to do already. But my issue is that the variable I'm working with is not in the proper format and the variable also includes the precise time of day, as you can see:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str14 incident "5/4/08 0:00" "12/1/07 18:30" "12/21/07 23:26" "9/31/14 22:50" "3/10/14 23:42" "1/13/13 22:55" "1/13/13 23:42" "12/31/08 23:53" "12/31/07 23:20" "6/1/08 0:10" "5/1/08 0:01" "5/1/07 22:15" "12/1/17 23:53" "3/4/16 0:55" "10/5/10 0:50" "10/1/09 1:00" "10/1/09 0:55" "10/1/08 0:30" "12/31/07 19:00" "11/1/08 1:13" "1/1/08 1:15" "12/31/13 20:00" "12/31/13 16:00" "1/1/12 18:00" "12/1/07 22:52" "12/31/07 23:42" "1/8/08 1:30" end
Comment