title: How to filter a part of dates and then change that part?
body: <p>There are a group of dates in <code>test_2</code> called df that I'm trying to change. For example: <code>2020-12-15</code> is in the <code>started_at</code> column and <code>2020-12-25</code> is in the <code>ended_at</code> column. I want to change the daypart of the <code>ended_at</code> column.</p>
  <p>I could write <code>day(test_2$ended_at) &lt;- 15</code>  #[thanks Ben for guiding me with this chunk]</p>
  <p>But the problem is there are some other days also. Like, <code>2020-12-08</code> etc.</p>
  <p>How is it possible to filter the required part of the date and change it?
  I soulfully appreciate your kind help.</p>
  <p>Here is the dput of the data structure.</p>
  <pre><code>&gt; dput(test_2)  
  structure(list(started_at = structure(c(1608033433, 1608033092, 
  1608033242, 1608034138, 1608034548, 1608033904, 1608033525, 1608032413, 
  1608032432, 1607385918, 1608032241, 1608034867, 1609079592, 1608033139, 
  1608032406, 1608034912, 1608033844, 1608032114, 1608034239, 1608032677, 
  1608032219, 1608033975, 1609459101, 1608032929, 1608034558, 1608034138, 
  1608033654, 1608033875, 1606810523, 1608034878, 1608034232), tzone = &quot;UTC&quot;, class = c(&quot;POSIXct&quot;, 
  &quot;POSIXt&quot;)), ended_at = structure(c(1608914839, 1608908027, 1608909124, 
  1608924913, 1608905112, 1608920814, 1608915081, 1608891612, 1608896054, 
  1607385667, 1608891462, 1608922015, 1606985651, 1608907113, 1608896350, 
  1608923619, 1608923486, 1608887393, 1608934063, 1608899164, 1608886816, 
  1608924042, 1606781193, 1608907025, 1608914882, 1608923510, 1608921699, 
  1608922845, 1606810492, 1608913874, 1608943331), tzone = &quot;UTC&quot;, class = c(&quot;POSIXct&quot;, 
  &quot;POSIXt&quot;))), row.names = c(NA, -31L), class = c(&quot;tbl_df&quot;, &quot;tbl&quot;, 
  &quot;data.frame&quot;))
  </code></pre>