A copy of my answer from here: https://stackoverflow.com/a/79622236/19713874
Another solution from my experience, not a purist one but working: convert both variables to character, and with
str_remove()
make the formats identical. After thatleft_join
works fine, and the variable can be converted back to date format.