title: How to get the union of two date vectors in Stata?
body: <p>I have the following data: </p>
  
  <pre><code>id  test1   test1_date    test2 test2_date
  1   2   Jun 23, 2014 21:29  26  Jun 20, 2014 06:27
  1   2   Jun 24, 2014 01:44  25  Jun 21, 2014 02:53 
  1   2   Jun 24, 2014 06:20  25  Jun 22, 2014 07:38
  2   2   Jun 25, 2014 22:15  30  Jun 26, 2014 11:08
  2   0   Jun 26, 2014 02:35  25  Jun 27, 2014 20:09
  2   2   Jun 26, 2014 06:49  25  Jun 30, 2014 14:47
  </code></pre>
  
  <p>This is in so-called wide format. I would like to convert it to long format as follows:</p>
  
  <pre><code>id  date               test value
  1   Jun 20, 2014 06:27  2   26
  1   Jun 21, 2014 02:53  2   25
  1   Jun 22, 2014 07:38  2   25
  1   Jun 23, 2014 21:29  1   2
  1   Jun 24, 2014 01:44  1   2
  1   Jun 24, 2014 06:20  1   2
  2   Jun 25, 2014 22:15  1   2
  2   Jun 26, 2014 02:35  1   0
  2   Jun 26, 2014 06:49  1   2
  2   Jun 26, 2014 11:08  2   30
  2   Jun 27, 2014 20:09  2   25
  2   Jun 30, 2014 14:47  2   25
  </code></pre>
  
  <p>I tried the <code>reshape</code> command: </p>
  
  <pre><code>reshape test1 test2, i(id)
  </code></pre>
  
  <p>However, it creates a missing values vector.
  Another try was</p>
  
  <pre><code>reshape long test1 test2 , i(id test1_date test2_date)
  </code></pre>