title: Why are dates in a list first converted to numeric when coercing to character
body: <p>I'm trying to convert a column of dates into strings, because I want to use them as factor levels at some later point in my code. </p>
  
  <p>The date column is part of a tibble, and is of class Date. I figured that a simple as.character() conversion would do the trick, but unfortunately I was wrong. Instead of neatly formatted strings it returns a number in string form. For example today (22 november 2017) would come out as "17492". So somewhere in the process the date gets converted into its numeric format and only then turned into a character string.</p>
  
  <p>Now I did find a workaround, by unlisting the data, converting it again to dates and then to character strings, but it is fairly inefficient.</p>
  
  <p>Can anyone explain i) why this occurs and ii) if there is an easier fix?</p>
  
  <p>Below a reproducible example:</p>
  
  <pre><code>#Get current system date
  foo &lt;-Sys.Date()
  #Convert to list
  foo &lt;- as.list(foo)
  #The following then produces the number string:
  as.character(foo)
  [1] "17492"
  #The following code works but is a rather annoying work-around
  as.character(as.Date(unlist(foo), origin=as.Date("1970-01-01")))
  [1] "2017-11-22"
  </code></pre>