Convert character column to date column in lubridate : <p>I have a dataframe looking like: </p>

<pre><code># A tibble: 10 x 4
      id incoming_date expiry_date end_date
   &lt;dbl&gt; &lt;chr&gt;         &lt;chr&gt;       &lt;chr&gt;   
 1     1 11.17.18      10.1.19     03.1.19 
 2    11 03.4.19       NA          03.20.19
 3     2 03.17.19      02.1.20     05.7.19 
 4     2 05.7.19       NA          06.15.19
 5     4 06.11.19      05.1.21     06.22.19
 6     1 06.12.19      04.1.21     NA      
 7     2 06.12.19      04.1.21     NA      
 8    13 11.16.18      06.1.19     02.20.19
 9     7 02.19.19      12.1.21     3.23.19 
10     1 03.19.19      01.1.21     09.10.19
</code></pre>

<p>reproducible:</p>

<pre><code>library(tidyverse)
library(lubridate) 

df &lt;-  as.tibble(structure(list(id = c(1, 11, 2, 2, 4, 1, 2, 13, 7, 1), incoming_date = c("11.17.18", 
    "03.4.19", "03.17.19", "05.7.19", "06.11.19", "06.12.19", "06.12.19", 
    "11.16.18", "02.19.19", "03.19.19"), expiry_date = c("10.1.19", 
    NA, "02.1.20", NA, "05.1.21", "04.1.21", "04.1.21", "06.1.19", 
    "12.1.21", "01.1.21"), end_date = c("03.1.19", "03.20.19", "05.7.19", 
    "06.15.19", "06.22.19", NA, NA, "02.20.19", "3.23.19", "09.10.19"
    )), row.names = c(NA, -10L), class = c("tbl_df", "tbl", "data.frame"
    )))
</code></pre>

<p>I want to convert the columns from character to date format, as follows: </p>

<pre><code>      id incoming_date expiry_date end_date  
   &lt;dbl&gt; &lt;date&gt;        &lt;date&gt;      &lt;date&gt;    
 1     1 2018-11-17    2019-10-01  2019-03-01
 2    11 2019-03-04    NA          2019-03-20
 3     2 2019-03-17    2020-02-01  2019-05-07
 4     2 2019-05-07    NA          2019-06-15
 5     4 2019-06-11    2021-05-01  2019-06-22
 6     1 2019-06-12    2021-04-01  NA        
 7     2 2019-06-12    2021-04-01  NA        
 8    13 2018-11-16    2019-06-01  2019-02-20
 9     7 2019-02-19    2021-12-01  2019-03-23
10     1 2019-03-19    2021-01-01  2019-09-10
</code></pre>

<p>What I tried to do - starting from the <code>incoming_date</code> column - is: </p>

<pre><code>df %&gt;%
  mutate(incoming_date_parsed = strptime(as.POSIXct(incoming_date), "%m.%d.%Y"))
</code></pre>

<p>throwing the error:</p>

<pre><code>Error in as.POSIXlt.character(x, tz, ...) : 
  character string is not in a standard unambiguous format
</code></pre>

<p>In logical order, what I would do is: </p>

<ol>
<li>Convert the column from character to datetime </li>
<li>Parse the date following in the format YYYY-MM-dd</li>
</ol>
