Here mydata
ga=structure(list(Date = c(190410L, 190410L, 190410L, 190410L, 190410L
), open = c(162.4, 162.57, 162.94, 162.87, 162.96), high = c(162.57,
162.94, 162.95, 163, 163.11), low = c(162.12, 162.51, 162.83,
162.83, 162.95), close = c(162.57, 162.94, 162.9, 162.95, 162.95
)), class = "data.frame", row.names = c(NA, -5L))
I use mdy
function from lubridate
ga$Date=mdy(ga$Date)
So I get only NA
.
How can i get such output format(mm.dd.yy)
Date open high low close
1 04.10.2019 162.40 162.57 162.12 162.57
2 04.10.2019 162.57 162.94 162.51 162.94
3 04.10.2019 162.94 162.95 162.83 162.90
4 04.10.2019162.87 163.00 162.83 162.95
5 04.10.2019 162.96 163.11 162.95 162.95