title: R script in Power BI returns date as Microsoft.OleDb.Date
body: <h3>The essence:</h3>
  <p>Why does Powerbi show data of the form <code>2017-01-04</code> (<code>yyyy-mm-dd</code>) like this?</p>
  <p><a href="https://i.stack.imgur.com/Lp3MJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Lp3MJ.png" alt="enter image description here" /></a></p>
  <hr />
  <h3>The details</h3>
  <p>I'm trying to transform a table in Power BI using the <code>Run R Script</code> functionality in <code>Edit Query</code>.
  The source of the table is a csv file with a column with dates of the format <code>2017-01-04</code> (<code>yyyy-mm-dd</code>):</p>
  <pre><code>2017-01-04
  2017-01-03
  2017-01-02
  2017-01-01
  2016-12-31
  2016-12-30
  2016-12-29
  2016-12-28
  2016-12-27
  2016-12-26
  2016-12-25
  2016-12-24
  2016-12-23
  2016-12-22
  </code></pre>
  <p>Using <code>Get Data</code>, Power BI shows the same date column like this:</p>
  <p><a href="https://i.stack.imgur.com/QNZjk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QNZjk.png" alt="enter image description here" /></a></p>
  <p>And after opening the <code>Edit Query window</code>, the very same date column still looks like this:</p>
  <p><a href="https://i.stack.imgur.com/R17Up.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R17Up.png" alt="enter image description here" /></a></p>
  <p>However, when trying to run an R sctript with the same data, the column only consists of the &quot;values&quot; <code>Microsoft.OleDb.Date</code> like this:</p>
  <p><a href="https://i.stack.imgur.com/b8YiZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/b8YiZ.png" alt="enter image description here" /></a></p>
  <p>The R script I'm running is simply:</p>
  <pre><code># 'dataset' holds the input data for this script
  output &lt;- head(dataset)
  </code></pre>
  <p>If I try to change the data type, en error is returned:</p>
  <p><a href="https://i.stack.imgur.com/oLW0g.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oLW0g.png" alt="enter image description here" /></a></p>
  <p>It all seems very strange to me, and I haven't found a reasonable explanation using Google.</p>
  <p>Any suggestions?</p>