I have data frame which looks something like this
co_stkdate returns
1:1 03-Apr-95 1.685
1:2 04-Apr-95 1.529
1:3 05-Apr-95
I want to convert it into
co_stkdate returns
1:1 03-04-1995 1.685
1:2 04-04-1995 1.529
1:3 05-04-1995
I tried this
myfiles$co_stkdate<- format(as.Date(myfiles$co_stkdate, format="%d-%M-%Y"))
But this is giving me result like this
co_stkdate returns
1:1 <NA> 1.685
1:2 <NA> 1.529
1:3 <NA> 1.338
1:4 <NA> -0.236
1:5 <NA> -0.250
1:6 <NA> 0.053
>