Hi,
I have 350,000 observations for plant construction of different sizes since 1994. These plants are constructed on different dates each year. I want to generate a new variable Fiscal Year and assign the plants constructed between 17/07/1994 to 16/07/1995 to 1994/95. Similarly, I want to assign plants constructed between 17/07/1995 to 16/07/1996 to 1995/96. I want to do this for the rest of the observations until 2016/17. My data is as below.
I use version stata 13.1.
Thank you.
Samir
I have 350,000 observations for plant construction of different sizes since 1994. These plants are constructed on different dates each year. I want to generate a new variable Fiscal Year and assign the plants constructed between 17/07/1994 to 16/07/1995 to 1994/95. Similarly, I want to assign plants constructed between 17/07/1995 to 16/07/1996 to 1995/96. I want to do this for the rest of the observations until 2016/17. My data is as below.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str12 plant_code str53 owner_name str1 gender byte size_code float construction_date2 "GGCJAN510019" "Bhagwati Devi" "F" 8 12416 "NGGLAM510037" "Tikaram Ghimire" "M" 8 12522 "NGGLAM510036" "Jun Maya Gurung" "F" 8 12522 "GGCITA510153" "Bhoj Raj Chauhan" "M" 10 12524 "RGGPOK510078" "Bishnu Kumari Sapkota" "F" 10 12524 "GGCBUT510108" "JHALAK NATH POUDEL" "M" 10 12525 "RGGPOK510090" "Gore Kumal" "M" 8 12527 "GGCLAL510059" "Ram Nath Ghimire" "M" 10 12528 "RGGDUM510112" "Rudra Nath Acharya" "M" 8 12529 "GGCBHA510034" "Pashupati Nath Khanal" "M" 10 12531 "GGCITA510184" "Prem Pd. Bhattarai" "M" 10 12531 "GGCBUT510187" "Chuma Bhushal" "M" 10 12537 "HGGBHA510019" "Bishnu Pd. Adhikari" "M" 8 12539 "GGCLAL510082" "Chitra Narayan Shrestha" "M" 8 12542 "GGCLAL510080" "Ram B. Shrestha" "M" 10 12542 "RGGGUL510054" "BUDDHI LAL GYAWALI" "M" 8 12549 "NBGLAL510020" "Guna Bdr. Jogi" "M" 6 12549 "NBGLAL510019" "Ram Sharan Karki" "M" 6 12550 "GGCDAN510070" "Muna Kumari Pachai" "F" 10 12553 "NBGBIT510112" "Tulshiram Parshi" "M" 15 12554 "GGCBHA510059" "Shyam Bhakta Subedi" "M" 8 12560 "NRGSYA510058" "Judha Bdr. Thapa" "M" 10 12562 "GGCDAN510135" "Wama Ghimire" "M" 15 12571 "RGGGUL510016" "Bhim Bdr. Poudel" "M" 10 12595 "NBGPOK510023" "Man Bdr. Khatri" "M" 10 12600 "GGCDUM510177" "Mohan Bdr. Bi. Ka." "M" 8 12616 end format %tdDD/NN/CCYY construction_date2
Thank you.
Samir
Comment