Hi all Statalists!
I have dates in my data set in DMY format. Here is a subset of the data:
I want to generate a new variable that takes the day and the month of the corresponding full date (test_date).
For example, if test_date == 16560 (04may2005 in DMY format), the new variable takes 04may (in DM format).
I need this new variable for regression analysis.
Many thanks!
I have dates in my data set in DMY format. Here is a subset of the data:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input int test_date 16560 16579 16589 16589 16602 16615 16618 15465 15467 15467 end format %td test_date
For example, if test_date == 16560 (04may2005 in DMY format), the new variable takes 04may (in DM format).
I need this new variable for regression analysis.
Many thanks!
Comment