[Solved] r: convert a string to date [duplicate]
We can use sub to create a – between the first 4 characters and the next 2. Match the four characters (.{4}), place it in a capture groups ((…)), followed by the next 2 characters in another capture group, replace it with the backreference for those groups (\\1, \\2) and in between we add the … Read more