I have some formatted dates that are between a good formatted date, something looks like this:
df & lt; - data.frame (col = c ("- 1.1.11-01", "- 1.11.12-1", "- 1.1.13-01", "- 1.1.14-01" "- 1.10.10- 01 "," - 1.10.11-01 "" --- 1.10.12-01 "," 2010-03-31 "," 2010-04-01 "," 2010-04-05 "))
How can I convert the wrong format between the current formatted date?
I am able to delete the first dash, but for this, the last 3 characters of -01
or -1
have to be removed. So the correct values are:
desired < - c ("1.1.11", "1.1.12", "1.1.13", "1.1.14", "1.10" 10 "," 1.10.11 "," 1.10.12 "," 2010-03- 31 "," 2010-04-01 "," 2010-04-05 "))
What I'm doing is messing with part of -01
Because, by removing them, it will also remove a part of the correct formatted dates.
Edit: Format mm.dd.yy
No comments:
Post a Comment