title: Date comparison with System Date in R
body: <p>I want to compare the data from one column which is the end date(end_date) with the system date(todays_date). Both columns are in the char format.</p>
  
  <pre><code>Input:
  $ name: chr  "Abby" "Abby" "Abby" "Abby" ...
  $ std: int  2 3 4 5 6 7 8 9 10 11 ...
  $ end_date: chr  "25-02-2016" "25-02-2016" "25-03-2018" "25-02-2019" ...
  $ todays_date: chr  "07-03-2018" "07-03-2018" "07-03-2018" "07-03-2018" ...
  </code></pre>
  
  <p>Is there any way I can pass a <code>sqldf</code> statement where I can get all the values of the input csv where end_date &lt; todays_date? Any way other than a <code>sqldf</code> statement where I can extract the values of the csv where end_date&lt; todays_date will do.</p>
  
  <p>I tried a few possible variations the below query but I can't seem to get the required output:</p>
  
  <pre><code>sel_a &lt;- sqldf(paste("SELECT * FROM input_a WHERE end_date&lt;", 
  todays_date, "", sep = ""))
  sel_a
  </code></pre>
  
  <p>PS: I have a huge amount of data and have reduced it to fit this question.</p>
  
  <p>Any help would be appreciated.</p>