I am working on a dataset with daily dates and I have successfully computed monthly dates and formatted thus:
. gen monthly_notification_date = mofd(outbreak_notification_dt)
. format monthly_notification_date %tm
But after doing a tabulation or table1 command which automatically exports the result to excel, I cannot get the monthly date to display properly in the output window (or in excel) in a way that can be interpreted. I get numbers such as 728, 731, 739 etc
How can I get
* Example generated by -dataex-. For more info, type help dataex
clear
input byte hospitalized int outbreak_notification_dt float monthly_notification_date
0 22258 731
0 22519 739
0 22272 731
0 22252 731
0 22385 735
0 22281 732
0 22310 732
0 22276 731
0 22299 732
0 22280 731
0 22404 736
0 22458 737
0 22257 731
0 22257 731
0 22293 732
0 22545 740
0 22279 731
0 22272 731
0 22335 733
0 22310 732
0 22272 731
0 22254 731
0 22321 733
0 22552 740
0 22550 740
0 22272 731
0 22276 731
0 22272 731
0 22281 732
0 22321 733
0 22273 731
0 22305 732
0 22511 739
0 22510 739
0 22321 733
0 22265 731
0 22277 731
0 22299 732
0 22272 731
0 22256 731
0 22321 733
0 22511 739
0 22511 739
0 22265 731
0 22519 739
0 22305 732
0 22490 738
0 22276 731
0 22265 731
0 22340 734
0 22341 734
0 22552 740
0 22552 740
0 22541 740
0 22404 736
0 22287 732
0 22258 731
0 22290 732
0 22490 738
0 22262 731
0 22378 735
0 22287 732
0 22287 732
. gen monthly_notification_date = mofd(outbreak_notification_dt)
. format monthly_notification_date %tm
But after doing a tabulation or table1 command which automatically exports the result to excel, I cannot get the monthly date to display properly in the output window (or in excel) in a way that can be interpreted. I get numbers such as 728, 731, 739 etc
How can I get
* Example generated by -dataex-. For more info, type help dataex
clear
input byte hospitalized int outbreak_notification_dt float monthly_notification_date
0 22258 731
0 22519 739
0 22272 731
0 22252 731
0 22385 735
0 22281 732
0 22310 732
0 22276 731
0 22299 732
0 22280 731
0 22404 736
0 22458 737
0 22257 731
0 22257 731
0 22293 732
0 22545 740
0 22279 731
0 22272 731
0 22335 733
0 22310 732
0 22272 731
0 22254 731
0 22321 733
0 22552 740
0 22550 740
0 22272 731
0 22276 731
0 22272 731
0 22281 732
0 22321 733
0 22273 731
0 22305 732
0 22511 739
0 22510 739
0 22321 733
0 22265 731
0 22277 731
0 22299 732
0 22272 731
0 22256 731
0 22321 733
0 22511 739
0 22511 739
0 22265 731
0 22519 739
0 22305 732
0 22490 738
0 22276 731
0 22265 731
0 22340 734
0 22341 734
0 22552 740
0 22552 740
0 22541 740
0 22404 736
0 22287 732
0 22258 731
0 22290 732
0 22490 738
0 22262 731
0 22378 735
0 22287 732
0 22287 732
Comment