title: Error in charToDate(x)
body: <p>I want to select a subset of a data.frame containing only information about the current date.</p>
  
  <pre><code>today = Sys.Date()
  LasttDate = paste("'",today,"'",sep = "")
  &gt; LastDate
  [1] "'2013-04-30'"
  </code></pre>
  
  <p>The selection is performed via the following code containing the date and it works</p>
  
  <pre><code>Lastdbdata = dbdata[dbdata$DateNav == '2013-04-30',]
  </code></pre>
  
  <p>In case we do not want to write all the times the Date but we want it to be selected automatically when running the code I though we could write instead </p>
  
  <pre><code>    Lastdbdata = dbdata[dbdata$DateNav == LastDate,]
      Errore in charToDate(x) : 
      character string is not in a standard unambiguous format
  </code></pre>
  
  <p>but it does not work and returns the error above.
  Which is the trick to solve this error?</p>