title: Stata: Aggregating by week
body: <p>I have a dataset that has a date variable with missing dates. </p>
  
  <pre><code>var1
  15sep2014
  15sep2014
  17sep2014
  18sep2014
  22sep2014
  22sep2014
  22sep2014
  29sep2014
  06oct2014
  </code></pre>
  
  <p>I aggregated the data using this command. </p>
  
  <pre><code>gen week = week(var1)
  </code></pre>
  
  <p>and the results look like this </p>
  
  <pre><code>var 1      week
  15sep2014   37
  15sep2014   37
  17sep2014   38
  18sep2014   38
  22sep2014   38
  </code></pre>
  
  <p>I was wondering whether it would be possible to get the month name and year in the week variable. </p>