I want to create a continuous day variable from January 1, 1991, to June 12, 1991. For instance, I expect February 1 to be day 32 (after January 31 which should be day 31) and February 3 to be day 34. My data variable is like this:
Date
Jan 01, 1991
Feb 19, 1991
Jan 03, 1991
Feb 22, 1991
Jan 02, 1991
Feb 26, 1991
Jan 02, 1991
Mar 01, 1991
I tried gen day1=day(Date) but it did not work. The day number starts over from the first day of each month. Any help would be appreciated.
0 Response to Creating a day variable
Post a Comment