Hi, and welcome.
Questions benefit greatly from a reproducible example, called a reprex. In this case it would resolve an ambiguity of whether your date columns were character strings, like "2020-01-18"
or class.
The lubridate
package has functions to discard DD
to get a year/month.
The dplyr
package allows you to replace the contents of the first column with those of the second. Here, again, an assumption is needed without a reprex
--that the empty data for column 1 is represented by NA
The syntax to do this would be
my_data %<>% mutate(Date1 <- ifelse(is.na(),Date2,Date1)
(there's also a sort function, called arrange
but you'll want to look at the R for Data Science chapters on this, first.