title: How to convert datetimes to days of the year?
body: <p>Suppose <code>DT</code> is a vector of type <code>datetime</code>. How can I get their days of the year?</p>
  
  <p>This is an approximation, but I can't find the right function:  </p>
  
  <pre><code>month(DT) * 30 + day(DT)
  </code></pre>