Hi,

I am experiencing similar problems as here:
https://www.statalist.org/forums/for...variable-dates

I would like to reshape long in a way that I have panel data "currency_pairs date". I have many different currencies and 2 variables for each of them ( s_* and f_* ). I am having problems to reshape. I have tried the following but did not work:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float date double(s_AUD_EUR f_AUD_EUR s_AUD_GBP f_AUD_GBP s_JPY_AUD f_JPY_AUD s_NZD_AUD)
564 1.67755 1.68102   2.527 2.52878   93.71  93.2855  1.1271
565 1.67645 1.68002 2.48715 2.48908   93.45  93.0071  1.1253
566  1.6478 1.65118 2.42785 2.42982   95.45  94.9496  1.1299
567 1.63965 1.64311 2.40265 2.40429    99.4  98.8931 1.12045
568 1.62585 1.62895 2.39005 2.39138  100.82 100.3361  1.1225
569 1.59185 1.59482 2.36485 2.36582  104.77 104.2651 1.09825
570 1.59765 1.60102 2.37165   2.373  102.01 101.4717  1.1144
571  1.6757  1.6793 2.47935 2.47998   94.67  94.1955  1.1621
572 1.60705 1.61043 2.30225 2.30378  101.78 101.2676  1.1718
573  1.5611 1.56454 2.24155  2.2432 106.855  106.298 1.20505
574 1.65975 1.66283  2.3249 2.32549  98.065  97.5695  1.1535
575 1.66515 1.66892 2.26705 2.26894  98.075   97.579 1.14075
576  1.6591 1.66293  2.2277 2.23066  94.875  94.3898   1.139
577 1.62295 1.62753 2.12655  2.1302   97.38   96.827 1.16685
578 1.73585 1.74058 2.17725 2.18073  90.855    90.34 1.16085
579 1.65215 1.65665  2.1017 2.10567   98.48  97.9036 1.20545
580  1.6299 1.63405 2.07265 2.07613 100.625 100.0647  1.2172
581  1.6418 1.64647  2.0738   2.078 101.705 101.0729 1.26095
582  1.6589 1.66305  2.1061 2.10999 101.635 101.0386 1.28475
583 1.70955 1.71317  2.1179  2.1211   93.47  92.9748 1.22465
584 1.78075 1.78829  2.2597 2.26774  83.815  83.3119  1.1819
585 1.92205 1.92521   2.449 2.45166  64.895  64.6346 1.13515
586  1.9486 1.95074 2.35635 2.36006  62.025  61.8343  1.1889
587 1.99375 1.99792  2.0622 2.06756  63.135  62.8661 1.19285
588 2.01525 2.01879  2.2672 2.27127  57.095  56.9392 1.25445
589   1.988 1.99204 2.23115 2.23583  62.495  62.3216 1.27645
590  1.9109 1.91513 2.06295 2.06779   68.64  68.4571 1.21755
591  1.8036 1.80722  2.0169 2.02109  72.275  72.0892 1.29175
592 1.76835 1.77176 2.01455 2.01876   76.37  76.1764  1.2499
593   1.735 1.73924 2.03705 2.04195   78.02  77.8011   1.248
594  1.7054 1.70967  1.9942 1.99895   79.13  78.9134  1.2628
595  1.7022 1.70626  1.9332 1.93762   78.21  78.0121  1.2291
596  1.6562 1.66023  1.8122 1.81637   79.04  78.8313  1.2198
597 1.63285 1.63732  1.8242 1.82899   81.78  81.5388  1.2492
598  1.6402 1.64528  1.7929 1.79824   78.86  78.5961  1.2797
599  1.5953 1.60029  1.7956 1.80092   83.76  83.4854  1.2363
600  1.5638 1.56825 1.80275 1.80768   80.58  80.3372  1.2607
601 1.52395 1.52942  1.7001 1.70582   79.61    79.31  1.2826
602  1.4742 1.47907 1.65265 1.65779   85.79  85.4967  1.2939
603 1.42845 1.43356 1.64435 1.64989   87.49  87.1599  1.2745
604 1.46295  1.4684  1.7323 1.73826   76.37  76.0763  1.2426
605  1.4502 1.45574 1.77125 1.77774   74.75  74.4394  1.2282
606 1.43915 1.44485    1.73 1.73663   78.48  78.1505  1.2502
607 1.42795 1.43347 1.72675 1.73312    74.8  74.4839  1.2706
608 1.40995 1.41494 1.62745 1.63321   80.83  80.5076  1.3166
609   1.418 1.42253  1.6311 1.63657   78.94  78.6405  1.2813
610  1.3573 1.36271 1.62385 1.63012   80.32  79.9553  1.2889
611 1.30875 1.31407  1.5274 1.53328   83.11   82.742  1.3111
612  1.3751 1.37939 1.60655 1.61182   81.67  81.3728  1.2897
613 1.35635 1.36134  1.5973 1.60334   83.41  83.0563  1.3547
614 1.37225 1.37657    1.55 1.55524   85.69  85.3577   1.356
615  1.3557 1.35985 1.52415 1.52947   88.85  88.4918  1.3561
616  1.3492 1.35381  1.5447 1.55056   86.55  86.1788  1.2955
617  1.3542 1.35838  1.4996 1.50491   86.46  86.1091  1.2963
618  1.3082 1.31298  1.4944 1.50033   84.79  84.4015  1.2574
619  1.3444 1.34938  1.5204 1.52605    81.9  81.5477  1.2542
620  1.3805  1.3859 1.60285 1.60901   74.87  74.5288  1.2707
621  1.3147 1.31907 1.52135 1.52647   82.71   82.363  1.3062
622  1.3104 1.31571   1.531 1.53627   79.79  79.4204   1.319
623  1.2662 1.27124  1.5159 1.52114   78.87  78.5387  1.3149
624 1.23175 1.23583  1.4849 1.48936   81.02  80.7318   1.286
625  1.2381 1.24263  1.4785 1.48342    87.5  87.1694  1.2814
626  1.2855 1.29002  1.5423 1.54723   85.27  84.9573  1.2643
627 1.27135 1.27599  1.5598 1.56497   83.12  82.8058  1.2725
628 1.27475 1.27859 1.58685 1.59115   76.09   75.848  1.2907
629 1.23805 1.24198  1.5301 1.53452    81.8  81.5235  1.2754
630  1.1703 1.17428 1.48885 1.49336   82.16  81.8837  1.2964
631  1.2197 1.22347 1.53695 1.54105   80.92  80.6766  1.2864
632 1.23715 1.24113 1.55285 1.55724   80.89   80.634  1.2516
633  1.2496 1.25295 1.55365  1.5572   82.91  82.6853  1.2614
634  1.2467  1.2501  1.5362 1.53985   86.03    85.79  1.2713
635  1.2699 1.27327  1.5657 1.56929   89.77  89.5334  1.2587
636  1.3014 1.30436    1.52 1.52301   95.17  94.9504  1.2409
637 1.27705 1.28032  1.4827 1.48598   94.49  94.2489  1.2347
638  1.2317 1.23469  1.4565  1.4595   98.03   97.792  1.2448
639  1.2701 1.27338 1.49935 1.50265   101.1 100.8417  1.2104
640 1.35175 1.35499 1.58135 1.58453    96.8  96.5727  1.2027
641 1.42005 1.42347 1.65695 1.66039   90.92  90.7029  1.1851
642  1.4796 1.48295 1.68925 1.69258   88.26  88.0529  1.1276
643  1.4805 1.48355  1.7368 1.73984    87.4  87.2158  1.1518
644 1.44765 1.45093  1.7319 1.73521   91.76  91.5434  1.1226
645 1.43565 1.43858  1.6966 1.69956    92.9  92.7046  1.1441
646  1.4899 1.49285 1.79245 1.79564   93.54  93.3265  1.1193
647  1.5402 1.54333  1.8513 1.85469   94.02  93.8148  1.0871
648  1.5456 1.54854  1.8836 1.88677   88.98  88.8003   1.079
649 1.54345 1.54664  1.8728 1.87625   91.34  91.1358  1.0649
650   1.487    1.49 1.79875 1.80204   95.45  95.2376  1.0681
651  1.4965 1.49953  1.8224 1.82584   94.64  94.4218  1.0783
652 1.46615 1.46911 1.80225 1.80559    94.7  94.4858  1.0959
653  1.4506 1.45431 1.81155 1.81552    95.6  95.3444  1.0778
654  1.4392 1.44238   1.816 1.81939   95.57  95.3487  1.0954
655  1.4083 1.41149 1.77565 1.77892   97.15  96.9252  1.1174
656 1.44365 1.44721  1.8526 1.85635   95.99  95.7515  1.1226
657 1.42535 1.42861  1.8201 1.82342   98.55   98.323  1.1299
658 1.46065 1.46403 1.83485 1.83852  101.31  101.028  1.0873
659 1.47865 1.48242 1.90535 1.90914    98.1  97.8524  1.0471
660 1.44905 1.45203  1.9286 1.93174   91.53  91.3379  1.0733
661 1.43295 1.43639 1.97435  1.9778   93.58  93.3509  1.0344
662 1.40585 1.40901 1.94315 1.94634   91.63   91.418  1.0189
663 1.42065 1.42362  1.9483 1.95121   94.31  94.1236   1.036
end
format %tm date
I have tried the following with no success. I suspect I need to rename currency pairs with numbers, but I need to keep track of their names and I'm not really sure how to proceed. Please help. Thanks.
Code:
reshape long s f, i(date) j( _* )