I'm trying to create a new variable derived from one date (DateACR_num) which include month and date reformated as 1,2,3 from May 2011 (=1).
I try:
Code:
gen date = dofm(DateACR_num) format date %tm gen wanted = date - ym(2011, 05)
* Example generated by -dataex-. To install: ssc install dataex
clear
input float(DateACR_num wanted)
18763 570470
18763 570470
18765 570531
18765 570531
18766 570562
18766 570562
18767 570592
18767 570592
18767 570592
18767 570592
18767 570592
18767 570592
18767 570592
18768 570623
18770 570683
18771 570714
18772 570744
18773 570775
0 Response to How to create new variable with month and year since May, 2011 as n°1
Post a Comment